---
title: Creating custom tables
related:
  - https://docs.kentico.com/k11/developing-websites/loading-and-displaying-data-on-websites/displaying-data-from-custom-tables.md
  - https://docs.kentico.com/k11/developing-websites/loading-and-displaying-data-on-websites/writing-transformations/writing-transformations-for-custom-tables.md
  - https://docs.kentico.com/k11/custom-development/developing-form-controls.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

There are two applications related to custom tables in Kentico:

- **Custom tables** application allows you to create new custom tables, given you possess the global administrator privilege level. You can also view and manipulate data in existing tables using this interface.
- **Custom table data** application allows you to view and manipulate data in existing custom tables only.

Note that you can create new custom tables using the wizard in the **Custom tables** application only. There is currently no simple way of creating custom tables using the API. This is due to the need to create related objects and settings — these tasks are handled by the wizard.

## Creating a custom table

Follow the example to create a new custom table using the **New custom table wizard**.

### Starting the New custom table wizard

1. Open the **Custom tables** application.
2. Click **New custom table**. A **New custom table wizard** starts.

### Step 1

1. Enter the following details:
   - **Custom table display name:** People
     - display name is used in Kentico user interface.
   - **Namespace**: customtable
   - **Name**: people
     - Name is used in website code — always preceded by a Namespace, which allows you to have different tables of the same name in different contexts.
2. Click **Next**.

![Entering the details of the new custom table](https://docs.kentico.com/docsassets/k11/creating-custom-tables/step1_entering_display_and_code_name.png "Entering the details of the new custom table")

### Step 2

Specify the details of the database table that the custom table uses.

1. Choose **Create a new database table**.
2. Leave the value _customtable\_People_ in the **Database table name field**.

   **Click here for information about the available options**

   - **Create a new database table** - choose this option to create a brand new table in the system's database.
     - **Database table name** - the actual name of the table in the system database. A name in the __\_ format is pre-filled automatically.
     - **Primary key name** - primary key column name, pre-filled with the _ItemID_ value.

   - **Use an existing database table** - choose this option if you already have a physical table in the system database and want to register it in the system.
     - **Database table name** - the actual name of the table in the system database. The drop-down list offers only database tables which are not part of the default Kentico database schema and are not yet registered for any object.
     - **Primary key name** - primary key column name. The original table's primary key column is used automatically. Note that this column needs to be an identity column as well.\
       The following check-boxes allow you to choose the default fields that you want to include in the custom table:

   - **Include ItemGUID field** - globally unique ID of the particular custom table data record. Note that this field is mandatory if you want to [stage the table's data](https://docs.kentico.com/k11/deploying-websites/content-staging.md) to a different instance of Kentico.

   - **Include ItemCreatedBy field** - user name of the user who created the item.

   - **Include ItemCreatedWhen field** - date and time of when the item was created.

   - **Include ItemModifiedBy field** - user name of the user who last modified the item.

   - **Include ItemModifiedWhen field** - date and time of last modification.

   - **Include ItemOrder field** - order of the item when table content list is displayed. The lower number, the earlier position in the list.
3. Make sure all the checkboxes are enabled.
4. Click **Next**.

![Specifying the details of the database table](https://docs.kentico.com/docsassets/k11/creating-custom-tables/step2_table_name_and_fields.png "Specifying the details of the database table")

### Step 3

Third step contains a [field editor](https://docs.kentico.com/k11/custom-development/developing-form-controls/reference-field-editor.md). The field editor lets you define the columns in the database table.

Create the following fields to follow this example:

1. Create a field using the **New field** button with the following properties:

   - **Field name:** FirstName
   - **Data type:** Text
   - **Size:** 100
   - **Required:** Yes (check the box)
   - **Field caption:** First name
   - **Form control:** Text box
2. Click **Save**.
3. Create a second field using **New field** with the following properties:

   - **Field name:** LastName
   - **Data type:** Text
   - **Size:** 100
   - **Required:** Yes (check the box)
   - **Field caption:** Last name
   - **Form control:** Text box
4. Click **Save**.
5. Create a third field using **New field** with the following properties:
   - **Field name:** DateOfBirth
   - **Data type:** Date
   - **Required:** No (leave the box unchecked)
   - **Field caption:** Date of birth
   - **Form control:** Calendar
   - **Editing control settings -> Edit time:** No
   - **Editing control settings -> Show 'Now' link:** No
6. Click **Save**.
7. Click **Next**.

![Creating fields for the custom table](https://docs.kentico.com/docsassets/k11/creating-custom-tables/step3_creating_fields.png "Creating fields for the custom table")

### Step 4

Select for which sites you want to make the custom table available

1. Click **Add sites**. A dialog box opens.
2. Choose **Corporate Site** (or any site that you want to add the custom table to).
3. Click **Next**.

### Step 5

The last step gives you an overview of the tasks executed by the wizard.

**Finish** the wizard. The system redirects you to the **General** tab of the custom table that you created.
