SQL UPDATE Statement

Last updated: August 27, 2026.

UPDATE changes existing rows. A WHERE clause controls which rows are affected; without it, every row is updated.

Syntax

UPDATE table_name
SET column_name = expression
WHERE condition;

Example

UPDATE AntiqueOwners
SET Address = '77 Lincoln St.',
    City = 'Kirkland',
    State = 'Washington'
WHERE OwnerID = 21;

Preview the target rows with SELECT, use a transaction when available, and prefer a stable key in the WHERE clause.

See the current PostgreSQL SQL reference; confirm dialect details for your own database.

admin

admin

Leave a Reply

Your email address will not be published.