To update records in a table of data in DB2 is very simple, using UPDATE command from the syntax shown below quickly you realize that common action in the life of a programmer or DBA.

UPDATE [Table]

SET [Column] = [Value]

In the above syntax UPDATE command will update all records in the table as well as DELETE, for example, it is necessary to use the WHERE clause to avoid errors and inconsistencies in the data.

UPDATE tshirt

SET Size = ‘M’


UPDATE tshirt

SET Size = ‘M’

WHERE Brand = ‘XYZ’

In the examples given have the following situations, the first all records of the table will be updated with the size M. In the second, only the records of the brand ‘XYZ’ will have its size attribute updated. To update records in a table, as happens in any database, it is important to be sure about the script since once performed only in the return form backup can recover the lost information.


DB2 has proven an excellent choice in the database and therefore is widely used in web projects, especially those using the PHP language, want to know why? Then visit our official page about DB2 in PHP projects and discover benefits of two technologies working together on your development project.

By , The most efficient web development environment. Create your web solutions in a fast and innovative way, reducing the development time in up to 80%. Access and learn more.

October 3, 2013


You might also like…

“Scriptcase is the best IDE we have used!” (SUITE TECHNOLOGY)

See how Suite Technology used Scriptcase to develop their projects. OVERVIEW Suite Technolog...

Exceptional Services Bestowed by Scriptcase Gets Recognized at GoodFirms

When it comes to Web hosting services Scriptcase is a choice. If you ask why? It’s becaus...

IaaS, PaaS and SaaS: understanding Cloud Computing types.

Cloud Computing is a factor that has been responsible for causing several important transformations...

You might also like…

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 Learn more about our Privacy Police.