Relational constraint question

Last Post 04 Aug 2006 01:09 AM by SQLUSA. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
jmnobre
New Member
New Member

--
02 Aug 2006 09:51 PM
Hi...

Probably this question occurs to me, since to my lack of experience, but I tried to figure out how to do it, and I can't find a solution...

Imagine my table T:

CREATE TABLE T (
A INT
, B INT
, C BIT

...
)

I need to constraint (A,B,C) in such a way that I can have multiple (A,B,0) but at most, only 1 (A,B,1).
Is there a way for me to cerate a relational constraint or should I explicit code it in my SPs?

Thanks in advance
SQLUSA
New Member
New Member

--
04 Aug 2006 01:09 AM
Probably you have to trigger it.

Kalman Toth, Database, Data Warehouse and BI Architect
http://www.sqlusa.com/order2005/
The Best SQL Server 2005 Training in the World


Acceptable Use Policy
---