0PricingLogin
SQL Academy · Lesson

INSERT with Multiple Rows

Insert one or many rows with a single statement, and use INSERT ... SELECT to copy data between tables.

Single-Row INSERT

The simplest form names columns and supplies values:

INSERT INTO users (email, full_name)
VALUES ('alice@example.com', 'Alice Adams');

Multi-Row INSERT

Insert many rows in one statement. Faster than many round-trips:

INSERT INTO users (email, full_name) VALUES
  ('alice@example.com', 'Alice Adams'),
  ('bob@example.com',   'Bob Brown'),
  ('carol@example.com', 'Carol Chen');

All lessons in this course

  1. INSERT with Multiple Rows
  2. UPSERT: ON CONFLICT DO UPDATE (PostgreSQL)
  3. UPDATE with FROM and JOIN-style Updates
  4. DELETE with USING and Safe Patterns
← Back to SQL Academy