Adding Columns to a Table with a Query in MS SQL

In MS SQL Server, the following procedure should be followed to add a column to a table with a query.

ALTER TABLE {Table Name} ADD {Column Name} {Data Type} {NULL or NOT NULL}

Example uses are given below..

ALTER TABLE Tbl_Customers ADD Address NVARCHAR(500) NULL ALTER TABLE Tbl_Products ADD ProdCode int NOT NULL


You May Interest

What is The Difference Between The Index Seek and Index Scan in S ...

What are the Authentication Modes in SQL Server ?

What are the Limitations of Indexed Views in SQL Server ?

How is Auditing Different From Change Data Capture in SQL Server?

What is CHECKPOINT Process in the SQL Server ?