On this page
  1. INSERT
  2. Syntax & Overview
  3. Notes & Best Practices
  4. Example

INSERT

Prev: `WITH` | Up: clauses | Next: `UPDATE`
Rel: clauses, SQL Query Execution Lifecycle
Ref: PostgreSQL — SQL Commands
Tags: #public #databases #sql #clauses #tier/core


Syntax & Overview

INSERT INTO users (email) VALUES ('ada@example.com');

Inserts one or more rows into a table.

Notes & Best Practices

Example

INSERT INTO users (email, name)
VALUES
  ('ada@example.com', 'Ada'),
  ('grace@example.com', 'Grace')
RETURNING id, email;

Linked from

Related notes