SQL UPDATE

From Petr Sladek

Jump to: navigation, search

SQL UPDATE SYNTAX

The overall syntax for SQL UPDATE SYNTAX is:

UPDATE table_name SET column_name=new_value WHERE id=value

So for example, if you want to update the value of the "started" field for the person with "id" equal to 123 in the table called "employee", you type:

UPDATE employee SET started=CURRENT WHERE id=123

In this example, you can see the DATE and DATE_TIME field setting to CURRENT.

Personal tools