# SQL DROP COLUMN and ADD COLUMN: adding and removing columns in SQL

DevFeed: [SQL DROP COLUMN and ADD COLUMN: adding and removing columns in SQL](<https://devfeed.tech/articles/sql-drop-column-and-add-column-adding-and-removing-columns-in-sql-23816.md>)

Original publisher: [Read original article](<https://cockroachlabs.com/blog/sql-add-column-drop-column>)

Author: Charlie Custer

Published: 2023-10-02T00:00:00Z

Content type: tutorial

Language: en

Sources: [Cockroach Labs](<https://devfeed.tech/sources/cockroach-labs.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [CockroachDB](<https://devfeed.tech/topics/cockroachdb.md>), [Databases](<https://devfeed.tech/topics/databases.md>)

Tags: [cockroachdb](<https://devfeed.tech/tags/cockroachdb.md>), [commands](<https://devfeed.tech/tags/commands.md>), [databases](<https://devfeed.tech/tags/databases.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [sql](<https://devfeed.tech/tags/sql.md>)

## AI overview

A tutorial on safely adding and removing SQL table columns with ALTER TABLE ... ADD and ALTER TABLE ... DROP COLUMN. It uses CockroachDB syntax and discusses constraints, data types, and differences across relational database systems.

## Source excerpt

In this article, we'll take a look at how to safely add and drop columns from a SQL database using ALTER TABLE ... ADD and ALTER TABLE ... DROP COLUMN. We will also briefly touch on adding and dropping constraints on SQL tables, since that functions in the same way and since it's important to consider constraints anyway when you're adding columns to a table.