---
title: "INSERT statement"
description: "The INSERT statement is a fundamental SQL command used to add new rows of data into a table."
canonical: "https://motherduck.com/glossary/insert-statement/"
related:
  - title: "INSERT | MotherDuck Docs"
    url: "https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/insert/"
  - title: "DuckDB statements | MotherDuck Docs"
    url: "https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/"
  - title: "2 - Loading Your Data | MotherDuck Docs"
    url: "https://motherduck.com/docs/getting-started/e2e-tutorial/part-2/"
---

# INSERT statement

> The INSERT statement is a fundamental SQL command used to add new rows of data into a table.

The `INSERT` statement is a fundamental SQL command used to add new rows of data into a table. In DuckDB, this statement allows you to populate tables with values, either one row at a time or in bulk. The basic syntax involves specifying the target table and the values to be inserted. For example:

```sql
INSERT INTO employees (first_name, last_name, hire_date)
VALUES ('John', 'Doe', '2023-01-15');
```

<glossary-callout guide="duckdb-cheatsheet-full" />

DuckDB also supports more advanced `INSERT` operations, such as inserting data from a query result:

```sql
INSERT INTO active_employees
SELECT * FROM employees WHERE termination_date IS NULL;
```

Additionally, DuckDB offers an `INSERT OR REPLACE` variant, which updates existing rows if a conflict occurs:

```sql
INSERT OR REPLACE INTO products (product_id, name, price)
VALUES (101, 'Widget Pro', 29.99);
```

Understanding and effectively using the `INSERT` statement is crucial for data manipulation and management in database systems, making it an essential skill for aspiring data professionals.
