Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding Field Constraint - urgent
Message
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01337318
Message ID:
01337334
Views:
8
>Hi everybody,
>
>I have this script
>
>ALTER TABLE People ALTER COLUMN IsActive bit NOT NULL CONSTRAINT [DF_People_IsActive] DEFAULT 1
>
>and it's not working. I need to add a new constraint to a field. How can I do this?
>
>Thanks.

The syntax is definitely not trivial

ALTER TABLE dbo.People ADD CONSTRAINT
DF_People_IsActive DEFAULT 1 FOR IsActive
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform