Section: Insert, update, delete, and upsert

Update matching rows

sql
sql
UPDATE users SET timezone = 'America/Los_Angeles' WHERE id = 1;
Explanation

Always verify the WHERE clause when running updates interactively.

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 upsert
Insert one row
Add a new record.
OpenIn sheetsqlsame section
Insert multiple rows
Add several records in one statement.
OpenIn sheetsqlsame section
Delete matching rows
Remove records by condition.
OpenIn sheetsqlsame section
Upsert with ON CONFLICT
Insert or update on a uniqueness collision.
OpenIn sheetsqlsame section
Ignore duplicates on conflict
Keep the existing row when a unique key collides.
OpenIn sheetsqlsame section
Select all columns
Read rows from a table.
OpenIn sheetsql1 tag match