skip to main content
SQL statements : DML statements : UPDATE
 

UPDATE

This statement changes one or more existing values in a table.

Syntax 

<update-stmt> ::= UPDATE <table_name> SET <set-value-list>
[<where-clause>]
<set-value-list> ::= <set-value-item> [,<set-value-item>]...
 
<set-value-item> ::= <column-name> = NULL
| <column-name> = <value-expression>

Examples

UPDATE emp SET sal = sal+1000 WHERE empno>100
UPDATE emp SET comm = 0 WHERE empno > 100 AND deptno = 2