Use below method to alter or change the default value of a column of an existing table:
ALTER TABLE <Table_Name> DROP CONSTRAINT <Column_Constraint_Name>
GO
ALTER TABLE <Table_Name> WITH NOCHECK
ADD CONSTRAINT [<Column_Constraint_Name>] DEFAULT (-10) FOR <Column_Name>
ALTER TABLE <Table_Name> DROP CONSTRAINT <Column_Constraint_Name>
GO
ALTER TABLE <Table_Name> WITH NOCHECK
ADD CONSTRAINT [<Column_Constraint_Name>] DEFAULT (-10) FOR <Column_Name>
No comments:
Post a Comment