> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/administration-and-setup/settings/global-settings/document-types/table-columns/editing-and-deleting-columns.md).

# Editing and deleting columns

Editing and deleting columns in a database table are important operations that must be performed carefully to ensure data integrity and consider potential impacts on application logic and reporting.

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

**Here are detailed steps for both actions:**

## Editing a column:

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

**Change title:**

* Click on the title of the column you want to change, a window will open and you can change the title of the column.

**Requirement analysis:**

* Identify the reason for editing the column. You may need to change the data type, add or remove constraints, or change the column name.

**Impact review:**

* Before making any changes, review how they will affect existing data and application logic. For example, changes to the data type may cause data to be converted or lost.

**Database backup:**

* Back up your database to ensure you have a working version to revert to in case of any problems.

**Executing the SQL statement:**

* Use the ALTER TABLE SQL statement to make the desired changes to the column. The exact syntax depends on the database platform you are using and the changes you want to make.

**Data migration:**

* If you change the data type of a column, you may need to perform data migration to convert existing data to the new format.

**Testing and validating:**

* After editing the column, thoroughly verify that your application is working properly and that the data is being stored and retrieved correctly.

## Deleting a column:

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

**Requirement analysis:**

* Make sure you understand the reasons for deleting the column. Is the column no longer relevant or are there other ways to consolidate it?

**Impact review:**

* Analyze how deleting the column will affect existing data, application logic, and reporting. This may result in data loss or affect queries and reports.

**Database backup:**

* Make a full backup of your database to ensure you can restore in case of unexpected problems.

**Executing the SQL statement:**

* Use the ALTER TABLE SQL statement to remove the column. The exact syntax varies by database platform.

**Data migration (if required):**

* If you have important data in the column you are deleting, you may need to perform a data migration to move that data to another location or delete it.

**Adjusting application logic:**

* Make sure your application logic is adjusted accordingly to ensure it no longer accesses the deleted column.

**Testing and validating:**

* Verify thoroughly that your application is working correctly and that all data and reporting functions are working as expected.

When editing or deleting columns, it is critical that you fully understand the impact of these actions and take appropriate precautions to maintain the integrity of your database and ensure that your application runs smoothly.


---

# 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.docbits.com/administration-and-setup/settings/global-settings/document-types/table-columns/editing-and-deleting-columns.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.
