How to Update Rows in PostgreSQL
Last updated July 24, 2026 · By the SaturnSQL team
Use UPDATE ... SET ... WHERE, with FROM to join another table. RETURNING shows exactly which rows changed, which doubles as a safety check.
UPDATE orders
SET status = 'shipped'
WHERE id = 42
RETURNING id, status;Update from another table
UPDATE orders o
SET region = c.region
FROM customers c
WHERE c.id = o.customer_id;Run this in SaturnSQL
SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.
Try it free