Modify existing data using a WHERE clause.
Section: INSERT, UPDATE, and DELETE
Update matching rows
sql
sql
UPDATE users
SET status = 'inactive'
WHERE last_login_at < DATE '2024-01-01';Explanation
Always confirm the WHERE clause before running UPDATE in production.
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, and DELETE