Home » Bigquery » Tutorials » INSERT from a table

BigQuery INSERT into table from select

Use the INSERT statement to add new rows to a table from the results of a select query

INSERT from a table example

INSERT dataset.Inventory_New (product, quantity, supply_constrained)
SELECT product, quantity, false FROM dataset.Inventory

If the number of columns are the same, you can INSERT without column names

INSERT dataset.Inventory_New (product, quantity, supply_constrained)
SELECT product, quantity, false FROM dataset.Inventory

Syntax reference

INSERT [INTO] target_name
 [(column_1 [, ..., column_n ] )]
 input

input ::=
 VALUES (expr_1 [, ..., expr_n ] )
        [, ..., (expr_k_1 [, ..., expr_k_n ] ) ]
| SELECT_QUERY

expr ::= value_expression