INSERT

The SQL statement that adds new rows to a table.

In more detail

Always list the columns you are filling, so the statement keeps working when the table gains a column. Pass values as bound parameters, let constraints reject bad rows, and read back the new row, with RETURNING or a follow-up SELECT.

Example

INSERT INTO customers (id, name, city, country, joined) VALUES (7, 'Farah Bello', 'Kano', 'NG', '2025-01-10');

Related terms

Taught in

References