Search This Blog

Add Column With Default Column Constraint to Table

I found many questions regarding the inline named default constraints in many user groups, its actually pretty simple

CREATE TABLE dbo.tempabc
(
[col1] [varchar] (16),
[col2] [int] NULL CONSTRAINT df__tempabc__Col2 DEFAULT ((0))
) ON [PRIMARY]
GO

No comments: