Introduction:
In this article I will explain how to write Query to add new column with default value to existing datatable in SQL server.
In this article I will explain how to write Query to add new column with default value to existing datatable in SQL server.
Description:
In
previous post I explained how to alter or add new column in datatable using SQL
Server. Now I will explain how to write query to add new column with
default value to existing datatable in SQL Server. During work with one
application I got requirement like alter existing table structure to add new
column with default value 0(zero). If we want to add new column with some default
value to existing table we need to write the query in a format as shown below