UPDATE

AttentionThis page documents an earlier version. Go to the latest (v2.1)version.

Synopsis

The UPDATE statement updates one or more column values for a row in table.

Syntax

Diagram

UPDATE - 图1

assignment

UPDATE - 图2

Grammar

  1. update ::= UPDATE table_name SET assignment [',' assignment ...] WHERE where_expression;
  2. assignment ::= { column_name | column_name'['index_expression']' } '=' expression

Where

  • table_name is an identifier.

Semantics

  • An error is raised if the specified table_name does not exist.
  • The where_expression must evaluate to boolean values.

See Also

CREATE TABLEDELETEINSERTSELECTOther PostgreSQL Statements