Home » Bigquery » Tutorials » DELETE statement

BigQuery DELETE statement

Deletes rows from a table

DELETE statement example

\nDELETE FROM dataset.Inventory\nWHERE quantity = 0\n
\n\n

DELETE with Subquery

\n
\nDELETE FROM dataset.Inventory i\nWHERE i.product NOT IN (SELECT product from dataset.NewArrivals)\n
\n\n

To delete all rows

\n
\nDELETE FROM dataset.Inventory\nWHERE TRUE\n

Syntax reference

DELETE [FROM] target_name [alias]\nWHERE condition