UPDATE with FROM and JOIN-style Updates
Update rows using values from another table with UPDATE ... FROM (PostgreSQL) and the standard MERGE statement.
Basic UPDATE
Change values in matching rows:
UPDATE users SET full_name = 'Alice Adams' WHERE id = 1;Multiple Columns
Comma-separated SET list:
UPDATE users
SET full_name = 'Alice', last_login = NOW(), visits = visits + 1
WHERE id = 1;All lessons in this course
- INSERT with Multiple Rows
- UPSERT: ON CONFLICT DO UPDATE (PostgreSQL)
- UPDATE with FROM and JOIN-style Updates
- DELETE with USING and Safe Patterns