---
url: /process-functions/table-create.md
description: Creates a table in the model.
---

# table.create

Creates a [table](/technical/tables) in the model, stored in a datasource, usually the `Internal Datastore`. It starts with no fields; add them with [table.fieldAdd](/process-functions/table-fieldadd).

::: 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.create(datasourceName, tableName)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `datasourceName` | `string` | The datasource to store the table in, such as `Internal Datastore`. |
| `tableName` | `string` | The table's name. |

## Returns

`true` if the table was created. `false` if a table with that name already exists or the datasource can't be found.

## Examples

```js
const created = table.create("Internal Datastore", "users");
```

## Related

* [table.fieldAdd](/process-functions/table-fieldadd)
* [table.exists](/process-functions/table-exists)
* [table.delete](/process-functions/table-delete)
