-->

Alter column set default

Post a Comment
CREATE TABLE dbo.tempabc
(
[col1] [varchar] (16),
[col2] [int] NULL CONSTRAINT df__tempabc__Col2 DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE dbo.tempabc ALTER COLUMN Col1 VARCHAR(32) NOT NULL
ALTER TABLE dbo.tempabc ADD CONSTRAINT df__tempabc__Col1 DEFAULT 'abc' FOR Col1
 

Related Posts

There is no other posts in this category.

Post a Comment

Subscribe Our Newsletter