> For the complete documentation index, see [llms.txt](https://docs.fabricplan.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fabricplan.com/documentation/readme/powertable-sheets/how-tos/adding-columns-overview/add-database-column.md).

# Add Database Column

Add new columns to the source database directly through the powertable app. This feature eliminates the need for users to engage with the database directly, enhancing security and efficiency.

{% hint style="info" %}

#### Note

Please ensure you have the required permissions to the database you are connected to, as you are adding a column directly to the source database.
{% endhint %}

Consider the following example where we will add the *Status* column to the **Products** table.

1. To add a new column to the source table, select **PowerTable** > **Insert Column** > **Database Column**.

<figure><img src="/files/0fN6oCVyLjWc1ybI916s" alt=""><figcaption></figcaption></figure>

2. In the side panel that opens, enter the column name and its data type. Consider you're adding a text column so you select the `VARCHAR` data type.

<figure><img src="/files/7qGwJPFYE3xwyRUiby7O" alt=""><figcaption></figcaption></figure>

3. Select **Not null** to prevent null values in the column. When this option is enabled, you must specify a default value so that if no value is available, the default value is used.

<figure><img src="/files/cb1ruR662wOCqOQbb6So" alt="" width="511"><figcaption></figcaption></figure>

4. You can optionally specify a default value for the column. Default values can be either **manual** or **formula-based**:

   * Select **Manual** to specify a static default value.
   * Select **Formula** to derive the default value using a configurable formula instead of a static value.

   <figure><img src="/files/4uhxanjwBdGoT8LoYJ07" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}

#### Note

You can optionally specify a default value for the column, regardless of whether the column is configured as nullable or non-nullable. For more information about configuring default values, see [**Default value**](https://docs.fabricplan.com/documentation/readme/powertable-sheets/how-tos/adding-columns-overview/pages/43a382c2b2837292159d8423d6e01e66424cfa56#id-3.-default-value).
{% endhint %}

5. Use **Length** to change the limit for the number of characters in this column.
6. Select **Save** to create the database column.

#### When Not null is selected:

* The default value is automatically populated in the newly created column and in any rows added in the future.&#x20;
* This ensures that a valid value is always available when no value is explicitly provided.
* You can later update these values.

<figure><img src="/files/mLE1cRKTUl24AaHhonCv" alt=""><figcaption></figcaption></figure>

#### When Not null is unselected:

* When Not null is cleared, the column accepts null values. When the column is created, the existing rows are left blank, even if a default value is set.
* However, when new rows are added, the configured default value is automatically populated in the column.
* Users can modify the default value if needed.

### Configure column properties

Configure additional properties for the newly added column using these steps:

1. Open the column header menu for the new column, and then select **Edit**.

<figure><img src="/files/q6NqbT9zO05yzcMYSeSS" alt=""><figcaption></figcaption></figure>

2. Configure the column properties, then select **Save**. To learn about configuring columns, see [Configure columns](/documentation/readme/powertable-sheets/how-tos/configure-column-properties.md).

<figure><img src="/files/hHrR6nCV3eWsM71eTHSO" alt="" width="563"><figcaption></figcaption></figure>

Now you can start entering data in the column. The newly added column as well as the changes are synced with the source database.

<figure><img src="/files/8GgL9LufYqMtNQAmEgYX" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fabricplan.com/documentation/readme/powertable-sheets/how-tos/adding-columns-overview/add-database-column.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
