# DELETE

[Read this page in HTML](https://www.scopedb.io/docs/reference/commands/statements/delete)

Removes rows from a table. `WHERE` limits the affected rows; without it, every row is deleted. The table definition remains available for future inserts.

## Syntax

```scopeql
DELETE FROM <table_name>
[ WHERE <predicate> ]
```

## Examples

Create a sample table with both real and test events:

```scopeql
CREATE TABLE event_cleanup (event_id string, is_test boolean)
```

```scopeql
VALUES ('evt-17', FALSE), ('test-42', TRUE)
INSERT INTO event_cleanup
```

Remove the test event:

```scopeql
DELETE FROM event_cleanup WHERE is_test = TRUE
```

```scopeql
FROM event_cleanup
ORDER BY event_id
```

```text
+----------+---------+
| event_id | is_test |
+----------+---------+
| evt-17   | false   |
+----------+---------+
```
