[dba-SQLServer] Adding a default to an existing column

Ken Stoker kens.programming at verizon.net
Tue Mar 29 13:53:29 CST 2005


I have put together the following to add a default to an existing table.  It
is telling me there is a syntax error near CONSTRAINT.  I have tried many
different things, this being the latest, getting similar problems.  

 

ALTER TABLE TableName

ALTER COLUMN ColumnName UserDefinedType NULL

CONSTRAINT AddOwnerDflt

DEFAULT '100000' WITH VALUES

GO

 

Thanks for any help.

 

Ken


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.8.4 - Release Date: 3/27/2005
 



More information about the dba-SQLServer mailing list