SQL SERVER - Alter with Default Values

SQL SERVER  - Alter with Default Values


-- Alter Table to add Field with Default Value for Existing Records

-- Which is not possible with Multiple Alter add Statement for Column and Constrainst


Alter TABLE [dbo].[Table_1] ADD [UUUX] [bit] NOT NULL  CONSTRAINT [DF_Table_1_UUUX]  DEFAULT 0 


Alter TABLE [dbo].[Table_1] ADD [YUYUY1234] [int] NOT NULL  CONSTRAINT  [YUYUY1234] DEFAULT ((0)

 


Comments

Popular posts from this blog

Shared / Static Class in vb.net/C#

Xamarin Forms : PopUp Page with RG.Plugins.Popup

Text was truncated or one or more characters had no match in the target code page.". (SQL Server Import and Export Wizard)