Skip to main content
The DELETE statement removes rows from a dataset. A WHERE clause restricts which rows are removed.
DELETE runs against datasets you own. To drop an entire dataset rather than delete rows, delete the dataset through the platform UI or API.

Syntax

  • The WHERE clause is optional. If omitted, every row in the dataset is removed. The dataset itself remains but is empty.
  • The WHERE condition can reference any column on the target dataset and use any NQL operators or functions.
  • The WHERE condition can reference only the target dataset. Subqueries that read from another dataset (for example, WHERE name IN (SELECT name FROM company_data."456")) are not supported.

Examples

Delete a single row by key:
Delete rows matching a condition:
Delete rows with null required fields:

Execution context

DELETE statements can run in two places:
DELETE is irreversible. Running DELETE FROM table_reference without a WHERE clause empties the dataset. Run the equivalent SELECT with the same predicate first to confirm exactly which rows will be removed.

INSERT

Add rows to a dataset

UPDATE

Modify existing rows in a dataset

SELECT

Preview rows before deleting

ExecuteDml workflow task

Run DML statements from a workflow