Connect with Peer Bloggers

Get your Bloggers ID and network with best bloggers around the world.

9

How to alter bit and date column's default value in MSSQL

Czetsuya
czetsuya's tech ― Aside from using the SQL Designer, you can alter a bit and date column's default value.ALTER TABLE TableName ADD CONSTRAINT TableName_Disabled DEFAULT 0 FOR DisabledALTER TABLE TableName ADD CONSTRAINT TableName_DateCreated DEFAULT getdate() FOR DateCreatedTo list the constraints created you can invoke:EXEC sp_help TableName

Voted by 1 User



What would you say?

Be the first to comment on this blog post! Sign in or Create an account.