Nate Pet
Nate Pet

Reputation: 46322

SQL Server - Constraints

I have a table in SQL Server and underneath, there is a constraints folder. How can I view the constraints in that folder? I didn't see a modify constraint to where I can view it.

Upvotes: 0

Views: 612

Answers (2)

marc_s
marc_s

Reputation: 755361

What do you mean by modify constraint ??

If you're talking about SQL Server Management Studio and its Object Explorer - you can right-click on the Constraints node for any given table and choose Add constraint - is that what you're looking for??

If you want to change an existing constraint. you need to click on that constraint and typically you need to script that out to drop and then re-create that constraint

enter image description here

You cannot just modify it "in place" (there's no Modify Constraint dialog box or anything like that).

Upvotes: 3

Bassam Mehanni
Bassam Mehanni

Reputation: 14944

You can just right click it and choose script as Create to a new query window to see what it is.

Upvotes: 0

Related Questions