# clear_table

> **Function** in `langchain_db2`

📖 [View in docs](https://reference.langchain.com/python/langchain-db2/db2vs/clear_table)

Remove all records from the table using TRUNCATE.

## Signature

```python
clear_table(
    client: Connection,
    table_name: str,
) -> None
```

## Description

??? example "Example"

```python
from langchain_db2.db2vs import clear_table

clear_table(
    client=db_client,  # ibm_db_dbi.Connection
    table_name="TABLE_NAME",
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `client` | `Connection` | Yes | The ibm_db_dbi connection object |
| `table_name` | `str` | Yes | The name of the table to clear |

---

[View source on GitHub](https://github.com/langchain-ai/langchain-ibm/blob/68e9b09f8cbc8d2310e57a6a7eb51cde0956a3b0/libs/langchain-db2/langchain_db2/db2vs.py#L178)