---
title: "How to add a new column to an existing SQL table using the ALTER TABLE statement."  
description: "How to add a new column to an existing SQL table using the ALTER TABLE statement."  
author: "Utpal Vishwas"  
published: 2023-08-30  
updated: 2023-08-31  
canonical: https://www.mindstick.com/forum/159777/how-to-add-a-new-column-to-an-existing-sql-table-using-the-alter-table-statement  
category: "mssql server"  
tags: ["mssql server", "sql server", "sql"]  
reading_time: 2 minutes  

---

# How to add a new column to an existing SQL table using the ALTER TABLE statement.

How to [add](https://www.mindstick.com/forum/12983/add-address-in-textbox-when-page-is-load-and-if-i-search-address-in-textbox-show-in-map-by-javascript) a new [column](https://www.mindstick.com/forum/33860/how-to-calculate-column-summary-in-sql-server) to an existing [SQL table](https://www.mindstick.com/forum/160519/how-can-i-update-sql-table-by-dataset-data-in-ado-dot-net) using the [ALTER](https://www.mindstick.com/forum/159630/create-alter-procedure-must-be-the-first-statement-in-a-query-batch) [TABLE statement](https://www.mindstick.com/forum/159765/how-do-you-rename-a-table-in-sql-using-the-alter-table-statement).

## Replies

### Reply by Aryan Kumar

Sure, I can help you with that.

To add a new column to an existing [SQL](https://www.mindstick.com/articles/13115/types-of-keys-in-sql-or-oracle-database) table using the [ALTER TABLE](https://www.mindstick.com/forum/811/alter-table-with-a-default-sql-server-vs-oracle) statement, you can use the following syntax:

SQL

```plaintext
ALTER TABLE table_name ADD column_name data_type [constraint];
```

The `table_name` is the name of the table to which you want to add the column. The `column_name` is the name of the new column. The `data_type` is the data type of the new column. The `constraint` is an optional clause that specifies any constraints on the new column.

For example, the following statement will add a new column named `age` of type `int` to the `customers` table:

SQL

```plaintext
ALTER TABLE customers ADD age int;
```

The following statement will add a new column named `country` of type `varchar(255)` to the `customers` table and set the default value to "USA":

SQL

```plaintext
ALTER TABLE customers ADD country varchar(255) DEFAULT 'USA';
```

You can also use the `ALTER TABLE` statement to add multiple columns to a table. For example, the following statement will add two new columns named `age` and `country` to the `customers` table:

SQL

```plaintext
ALTER TABLE customers ADD age int, country varchar(255);
```

It is important to note that when you add a new column to a table, the new column will be added to the end of the table. This means that any existing data in the table will not be affected by the addition of the new column.


---

Original Source: https://www.mindstick.com/forum/159777/how-to-add-a-new-column-to-an-existing-sql-table-using-the-alter-table-statement

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
