Section: Insert, Update, Delete, and Merge
Update rows
sql
sql
UPDATE public.users SET last_login_at = now() WHERE user_id = 42;Explanation
See summary for usage details.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Insert, Update, Delete, and Merge
Update from another table
Update rows using another table in the same statement.
Merge source data
Synchronize target data from a source relation with a single statement.
Insert with RETURNING
Insert rows and immediately return generated values.