SQL Add Column

In SQL Alter Table Add Column is used to add a new column to the existing table using query and Management Studio. For this demonstration, we use the Customer.

Table Records 1

SQL Add Column Example

To add a new one to the existing table, please use the following transact Alter table Add Column syntax.

ALTER TABLE [Table_Name]
ADD [New_Column] Data_Type (Length) NULL | NOT NULL

Let me insert Sales that allows Nulls to an existing Customers

USE [NewNameDB]

Commands completed successfully.

In the above Server code, we added the Sales of Money data type, and it will allow NULL Values. You can see the new col

SQL Add Column 3

Add New Column Using SQL Server Management Studio

From the Management Studio, right-click on the table, and select the Design.

Open in Design Mode using Management Studio 4

Selecting the Design option will open the table in design mode. Let me insert a new col called Tax of Money data type.

Insert New name and Select Data Type to add column in sql management studio 6

Click the Close button will display the pop-up window. Please select the Yes button to save the changes.

Click Yes button to save changes 7

Now you can see the newly included col called the tax.

View New one 8
Categories SQL