by Jeremy Canfield | Updated August 14th, 2016
Follow these steps to set a default to a column in a SQL Server table. In this example, the table name is MyTable, the column name is Col1, and we set 0 as the default value for the column.
- Sign into SQL Server Management Studio
- At the top, select New Query
- Type the following SQL command into the middle area:
ALTER TABLE MyTable ADD DEFAULT '0' FOR COL1;
- At the top, select Execute