SQLINSERTDMLtutorial

What is INSERT in SQL? Adding rows for beginners

INSERT is the SQL command for "add a new row". Plain words: basic syntax, batch inserts of multiple rows in one shot, INSERT FROM SELECT, RETURNING to get back generated IDs, and UPSERT via ON CONFLICT for idempotent operations. With before/after tables and common pitfalls.

1 min readSQL · INSERT · DML · tutorial

INSERT is the command for adding a new row to a table. The most basic operation: until something is inserted, the table is empty and there's nothing to SELECT.

This article is currently in Russian. The full English translation is on the way.

Practice on real tasks

Solve tasks in the SQL trainer with instant grading and hints.

Open trainer