Saturday, December 8, 2012

Add default value to existing column in sql server

 Add default value to existing column in sql server

Syntax
alter table [table name] add  default(value)  for [column name] 

Ex:  alter table tb add  default(0)  for status
 here status column is bit column,  adding default value as false.



Tags:Add DEFAULT to existing column - Database ...,

Change DEFAULT value for a column in sql server, Alter Table set default value ,

SQL Server Default Column Values,

Add Column Default Value - SQL Server

No comments:

Post a Comment