Skip to main content

INSERT

Insert records into a table, either from values provided in the SQL command or from rows returned by a SELECT statement.

If the table does not exist or the schema does not match, the INSERT operation fails.

Insert syntax
INSERT INTO <table_name>.<table_name>
[ ( <column_name> [, <column_name> ...]) ]
{
select_statement
| VALUES (value [, value ...]) [, (value [, value ...]) ...]
}

Parameters

{{< sql-section file="data/sql/apache-iceberg-tables.json" data="insertingData" >}}

Example

Inserts three records
INSERT INTO myTable VALUES 
(21, 'Ruth Asawa', 'American, 1926–2013', 'American', 'Female', 1926, 2013, 'Q7382874', '500077806'),
(38, 'Magdalena Abakanowicz', 'Polish, 1930–2017', 'Polish', 'Female', 1930, 2017, 'Q158080', '500084577'),
(56, 'Luis Alberto Acuña', 'Colombian, 1904–1994', 'Colombian', 'Male', 1904, 1994, null, null)