This link applies only to SQL Server Compact Edition, not to full SQL Server. The above statements apply only to SQL Server Compact Edition.
In full SQL Server, the default values ββfor columns are implemented using restrictions. You can add a default constraint to the table using something like
ALTER TABLE AccAccountGroup ADD CONSTRAINT AccAcctGrp_Name_Def DEFAULT 'default value' FOR name;
and lower it using
ALTER TABLE AccAccountGroup DROP CONSTRAINT AccAcctGrp_Name_Def;
Please note that you need to specify the name of the constraint when deleting it. If you do not know the name of the constraint, the next query will look for it. Change the dbo name as well as the names of tables and columns if / if necessary:
SELECT object_name(default_object_id) FROM sys.columns WHERE object_id = object_id('dbo.AccAccountGroup') AND name = 'Name';
Once you get the name of the constraint, you can drop it. (Confirmation: this request was taken from a comment posted here .)
source share