INSERT, UPDATE, DELETE
INSERT, UPDATE, DELETE — Master data modification statements: INSERT, UPDATE, DELETE, and their advanced variants. The guide walks through INSERT Statement, UPDATE Statement, DELETE Statement, UPSERT (INSERT ON CONFLICT). INSERT adds new rows. Single row: INSERT INTO table (col1, col2) VALUES (val1, val2). Multiple rows: comma-separated value lists. INSERT INTO ... SELECT copies from another table. INSERT DEFAULT VALUES uses column defaults. UPDATE modifies existing rows. Always include a WHERE clause to avoid updating all rows. UPDATE table SET col1 = val1, col2 = val2 WHERE condition. Use computed values: SET salary = salary * 1.1. UPDATE can JOIN other tables for cross-table updates. The guide is organized into 4 sections that build on each other, each pairing a prose explanation with real SQL you can run as-is. Related guides: SQL Introduction, SELECT Statement, WHERE Clause & Operators, SQL JOINs, GROUP BY & Aggregation. This is one of 25 SQL guides on SQL Reference — see the full list on the guides page.