---
url: /process-functions/table-exists.md
description: Checks whether the model has a table.
---

# table.exists

Checks whether the model has a [table](/technical/tables).

::: tip
For more control, such as other column types, indexes or keys, manage tables with SQL instead. Run `CREATE`, `ALTER` and `DROP TABLE` statements with [DatasourceClient](/process-functions/datasourceclient)'s `execute`.
:::

```js
table.exists(tableName)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `tableName` | `string` | The table's name or id. |

## Returns

`true` if the table exists, otherwise `false`.

## Examples

```js
const exists = table.exists("users");
```

## Related

* [table.create](/process-functions/table-create)
* [table.list](/process-functions/table-list)
