---
title: "How to add a column with a default value to an existing table in SQL Server"  
description: "How to add a column with a default value to an existing table in SQL Server"  
author: "Revati S Misra"  
published: 2023-04-12  
updated: 2023-04-13  
canonical: https://www.mindstick.com/forum/157761/how-to-add-a-column-with-a-default-value-to-an-existing-table-in-sql-server  
category: "mssql server"  
tags: ["sql server", "sql"]  
reading_time: 1 minute  

---

# How to add a column with a default value to an existing table in SQL Server

How to add a [column](https://www.mindstick.com/forum/33860/how-to-calculate-column-summary-in-sql-server) with a [default value](https://www.mindstick.com/forum/2035/default-value-when-using-singleordefault) to an [existing table](https://www.mindstick.com/forum/156738/how-to-add-and-remove-columns-from-an-existing-table-in-the-database) in [SQL Server](https://www.mindstick.com/articles/12999/what-is-table-valued-function-in-sql-server)

## Replies

### Reply by Krishnapriya Rajeev

To add a column with a [default](https://www.mindstick.com/interview/12771/what-is-the-importance-of-default-resources) [value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages) to an existing [table in SQL](https://www.mindstick.com/forum/205/find-the-all-column-with-schema-for-any-table-in-sql-server) [Server](https://www.mindstick.com/articles/43769/what-is-serverless-architecture-is-it-worth-switching-over), we can use the **ALTER TABLE** statement with the ADD COLUMN clause. Here's the basic syntax:

```plaintext
ALTER TABLE table_name
ADD column_name data_type DEFAULT default_value;
```

In this syntax, table_name is the name of the table to which we want to add the column, column_name is the name of the new column, data_type is the data type of the column, and default_value is the default value that we want to assign to the column.

Here's an example SQL query that demonstrates how we can add a column with a default value to an existing table:

```plaintext
ALTER TABLE customers
ADD membership_status VARCHAR(20) DEFAULT 'Regular';
```

This query will add a new column named *membership_status* to the customer's table with a data type of VARCHAR(20), and a default value of *Regular.* If a new row is inserted into the table without specifying a value for the *membership_status* column, it will automatically be assigned the value *Regular.*


---

Original Source: https://www.mindstick.com/forum/157761/how-to-add-a-column-with-a-default-value-to-an-existing-table-in-sql-server

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
