MySQueaL Resources

resources for mysql admins and developers who are squealing for help

More Resources

As shown on the left, there are two syntaxes for the UPDATE statement. Explanations of each and examples are provided in these documentation pages:

Main Doc Pages
Privileges Required
  • UPDATE
Comments
MySQL columns: everywhere I look are tables and columns; life is filled with databases of information to be ordered and grouped. (Berlin, Germany)

UPDATE Statement

If you want to change data in a table or just in some rows—even one row only—use this MySQL statement. Click on the heading here for more details.

hits past month: 13 ;  last updated: may 4, 2009 - 2:34am ;  parent: Data Manipulation Statements

Syntax

UPDATE [LOW_PRIORITY] [IGNORE] table
SET column=expression[, ...] 
[WHERE condition] 
[ORDER BY {column|expression|position}[ASC|DESC], ...] 
[LIMIT {[offset,] count|count OFFSET offset}]

UPDATE [LOW_PRIORITY] [IGNORE] table_reference 
     SET column=expression[, ...] 
     [WHERE condition]

Explanation

This statement changes existing rows of data in a table. The first syntax shown updates only one table per statement (see UPDATE a Single Table). The second syntax can be used to update or reference data in multiple tables from one statement (see UPDATE Multiple Tables). Explanations of both types of statements and examples of their use follow.

There are no examples for this page of our documentation. Return to Data Manipulation Statements page of our MySQL Documentation