Examples for business, study, careers, love, and more...
Examples :: MYSQL Examples :: Example of Update Mysql Statement

Example of Update Mysql Statement:

UPDATE items,month SET items.price=month.price WHERE items.id=month.id;

UPDATE t SET id = id + 1 ORDER BY id DESC;

UPDATE employees SET salary = 2000 WHERE salary < 2000


Example of Mysql Update


UPDATE [LOW_PRIORITY] [IGNORE] table_reference
SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...
[WHERE where_condition]
[ORDER BY ...]
[LIMIT row_count]

UPDATE [LOW_PRIORITY] [IGNORE] table_references
SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...
[WHERE where_condition]