UPDATE Command
|
Previous Top Next |
If MEMORY keyword is specified before the table_name then an in-memory table is referenced, not a disk one.
|
The name of an existing table.
|
The name of a column in a table.
|
An expression or a value to assign to a column.
|
|
A scalar query (SELECT statement) that supplies the single value to be assigned. Refer to the SELECT command for a description of the syntax.
|
An expression that returns a value of type boolean. Only rows for which this expression returns true will be updated.
|
A list of a column names in a table.
|
|
A row query (SELECT statement) that supplies the single or multiple values to be assigned to the listed columns. Refer to the SELECT command for a description of the syntax.
|
UPDATE MyTable SET val2 = 'Many' WHERE val1 > 2;
|
UPDATE Events e SET Ticket_price = (SELECT Capacity FROM Venues WHERE VenueNo=e.VenueNo)*2 WHERE Ticket_price <= 5
|
UPDATE Orders SET (ShipToAddr1,ShipToAddr2) = (SELECT Addr1, Addr2 FROM Customer WHERE CustNo=Orders.CustNo) WHERE CustNo IN (1221, 2156)
|