> ## Documentation Index
> Fetch the complete documentation index at: https://docs.macro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CreateTable

> Add a table — what the user sees as a tab — to an existing database. The new table starts empty, with no columns beyond the implicit `row_id`; the first column you add is each row's title.  Use this for a genuinely separate list that belongs with the others ("add a Sessions tab to the offsite tracker"), not for more columns on an existing one — that is AddColumn. Tables of one database can be joined in one query, and a relation (AddColumn with `linkToTableId`) is how rows of one point at rows of the other.  Requires edit access to the database. The response is the database's refreshed schema, so the new table's `id` and its exact `sqlName` are there without a second call — SQL names are derived from display names and disambiguated against the ones already taken, so read the `sqlName` rather than deriving it yourself. If `database` is null, creation still succeeded; call DescribeDatabase using databaseId before continuing. Do not repeat the create.

# CreateTable

Add a table — what the user sees as a tab — to an existing database. The new table starts empty, with no columns beyond the implicit `row_id`; the first column you add is each row's title.

Use this for a genuinely separate list that belongs with the others ("add a Sessions tab to the offsite tracker"), not for more columns on an existing one — that is AddColumn. Tables of one database can be joined in one query, and a relation (AddColumn with `linkToTableId`) is how rows of one point at rows of the other.

Requires edit access to the database. The response is the database's refreshed schema, so the new table's `id` and its exact `sqlName` are there without a second call — SQL names are derived from display names and disambiguated against the ones already taken, so read the `sqlName` rather than deriving it yourself. If `database` is null, creation still succeeded; call DescribeDatabase using databaseId before continuing. Do not repeat the create.

## Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `databaseId` | string | Yes | Id of the database to add the table to, from ListDatabases. |
| `name` | string | Yes | Display name of the table, as the user would title the tab — e.g. "Sessions". The SQL name is derived from it. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.