Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Constraints based on column values

Constraints based on column values

From: DL <dimitris_at_cs.umb.edu>
Date: 30 Apr 2003 09:01:30 -0700
Message-ID: <4bc2752b.0304300801.1588baf@posting.google.com>


I would like to check if there is a standard way in Oracle to set the following type of uniq constraint. Assuming that we have a table with columns (ID1, ID2 and ROLE) where ROLE can have values (1 and 0) can we set up a constraint that allows only a single row to have ROLE=1 for a given ID2 value (but there could exist several records with ROLE=0 and and the same ID2 value)

In theory to enforce this view a separate table should be created containing the ID1,ID2 values for ROLE=1, but in my environment they want to keep the info in a single table.

Thanks,

Dimitris. Received on Wed Apr 30 2003 - 11:01:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US