# Table

Table name wrapper for type-safe table references.

A `Table` wraps a table name string, providing a type-safe way to reference SurrealDB tables. It can be used anywhere a [`RecordIdType`](/docs/reference/python/api/values/#recordidtype) is accepted.

```python title="Import"
from surrealdb import Table
```

---

## Constructor {#constructor}

```python title="Syntax"
Table(table_name)
```

<table>
    <thead>
        <tr>
            <th>Parameter</th>
            <th>Type</th>
            <th>Description</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><code>table_name</code> _(required)_</td>
            <td><code>str</code></td>
            <td>The name of the table.</td>
        </tr>
    </tbody>
</table>

### Examples

```python
table = Table("users")
print(table.table_name)  # "users"
```

---

## Properties {#properties}

| Property | Type | Description |
|---|---|---|
| `table_name` | `str` | The table name string. |

---

## Usage {#usage}

`Table` is interchangeable with a plain `str` in most SDK methods. It is useful when you want to distinguish table references from arbitrary strings at the type level.

```python
from surrealdb import Surreal, Table

db = Surreal("ws://localhost:8000")
db.connect()
db.use("my_ns", "my_db")
db.signin({"username": "root", "password": "secret"})

users = db.select(Table("users"))
```

---

## See also

- [Data types](/docs/reference/python/api/values.md) - All SDK data types
- [RecordID](/docs/reference/python/api/values/record-id.md) - Record identifier with table and ID components
