# delete

The delete() method for the SurrealDB Mojo SDK deletes all records in a table, or a specific record.

Deletes all records in a table, or a specific record. This is a convenience wrapper that runs `DELETE <thing>;`.

```python title="Method Syntax"
client.delete(thing, session, txn)
```

## Arguments

<table>
    <thead>
        <tr>
            <th colspan="2" scope="col">Argument</th>
            <th colspan="2" scope="col">Description</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td colspan="2" scope="row" data-label="Argument"><code>thing</code></td>
            <td colspan="2" scope="row" data-label="Description">The table or specific record to delete.</td>
        </tr>
        <tr>
            <td colspan="2" scope="row" data-label="Argument"><code>session</code></td>
            <td colspan="2" scope="row" data-label="Description">An optional session id.</td>
        </tr>
        <tr>
            <td colspan="2" scope="row" data-label="Argument"><code>txn</code></td>
            <td colspan="2" scope="row" data-label="Description">An optional transaction id.</td>
        </tr>
    </tbody>
</table>

## Example usage

```python
# Delete a specific record
var resp = client.delete("person:chiru")

# Delete every record in a table
var cleared = client.delete("person")
```

## Translated query

```surql
DELETE $thing;
```
