UPDATE command is used in several databases to update records in tables and the Firebird is not different, then check the syntax used for this command.

UPDATE [Table]

SET [Column] = [Value]

Using the above command all records of a table will be updated with the data entered, because it is important to use the UPDATE statement along with conditional WHERE below show two examples of using this command.

EXAMPLE 1:

UPDATE product

SET Country = ‘BR’

EXAMPLE 2:

UPDATE product

SET Country = ‘USA’

WHERE cod_prod = 1

In the first example UPDATE command will update the column country with value ‘BR’ in all records from product table. In the second example, the UPDATE statement will update only the product that has the code 1 with value ‘USA’.

Update without the WHERE conditional rarelly happens, so it is very important to analyze the structure of the command and your need before you run it.

firebird-database

Firebird has become popular very fast and it has gained prominence in web development environments, especially those using PHP. Understand why at our official site and discover how the Firebird and PHP can be great allies when it comes to results.

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.