# delete

Delete records from a table in the database using the delete method with the SurrealDB PHP SDK.

Deletes all records in a table, or a specific record, from the database.

```php title="Method Syntax"
$db->delete($thing)
```

## Arguments
<table>
    <thead>
        <tr>
            <th colspan="2" scope="col">Arguments</th>
			<th colspan="2" scope="col">Type</th>
            <th colspan="2" scope="col">Description</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td colspan="2" scope="row" data-label="Arguments">
                <code>thing</code>
                <label label="required" />
            </td>
			<td colspan="2" scope="row" data-label="Type">
				<code>string</code>, <code>RecordId</code> or <code>StringRecordId</code>
			</td>
            <td colspan="2" scope="row" data-label="Description">
                The table name or a [`RecordId`](/docs/reference/php/v1/concepts/data-types.md#recordid) to delete.
            </td>
        </tr>
    </tbody>
</table>

## Example usage
```php
// Delete all records from a table
$db->delete('person');

// Delete a specific record from a table
$db->delete(new RecordId('person', 'h5wxrf2ewk8xjxosxtyc'));
```

## Translated query
This function will run the following query in the database.

```surql
DELETE $thing;
```
