Insert records in a table is part of everyday life of any developer, because it is important to know the respective command of this function in the database in which they are working. Currently in the development of Web applications, it is common to find the Firebird DBMS as standard and so we will explain below how to write records in tables stored in it.

Using INSERT can insert records in a table in Firebird as shown in the syntax and example below:

INSERT INTO [Table] ([Fields])

VALUES ([Values])

EXAMPLE:

INSERT INTO product (Name, Price)

VALUES (‘DVD Player’, ‘2000’)

In the example shown above insert a record into product table values ​​passing as the name of the product and its price.

The Firebird also provides the insertion from a query, as shown in the example below.

INSERT INTO product (Name, Price)

SELECT Name, Price FROM product_2

From a products query in the table product_2 will be inserted a mass data in the products table, but remember that the table data must be compatible with exactly the same type so there is no error in the execution of the command.

firebird-database

More and more Firebird has gained space in development environments, especially those that use PHP as default language development. Better understand this scenario and know the advantages of PHP with Firebird in our official site.

You might also like…

PROCESAMIENTO AJAX EN SCRIPTCASE

Ajax en los formularios de Scriptcase puede usarse para recargar un campo de tipo de select basado e...

IMPORTAR IMAGENES DE LA BASE DE DATOS Y UTILIZAR CLASES DE BOOSTRAP

Como muchas personas ya saben, Bootstrap es una biblioteca de front-end libre y de código abierto p...

TENDENCIAS DE DESARROLLO WEB PARA 2017

Usted verá en este post tendencias para 2017 en Diseño Web, en el medio digital y en el desarrollo...

Comment this post

Get new posts, resources, offers and more each week.

We will use the information you provide to update you about our Newsletter and Special Offers. You can unsubscribe any time you want by clinck in a link in the footer of any email you receive from us, or by contacting us at sales@scriptcase.net. Learn more about our Privacy Police.