Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a constraint or rule?

Status
Not open for further replies.

sqlval

Programmer
Jan 12, 2011
10
US
I need to put a constraint or rule on the column: if it's not null, it should be unique. I am not good with constraints at all. Can they be conditional? Your help is appreciated.
 
In SQL Server 2008 you can use UNIQUE filtered INDEX.
Otherwise I believe there was a thread in MSDN in Database Design forum on this exact topic, I'll try to find it.

PluralSight Learning Library
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top