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 -> How to create a uniqueness constraint based on two fields?

How to create a uniqueness constraint based on two fields?

From: Ramon <ramon_at_conexus.net>
Date: 26 Jan 2005 04:25:50 -0800
Message-ID: <1106742350.311009.306060@c13g2000cwb.googlegroups.com>


I have read in this NG that there is a way to to have a uniqueness constraint based on two or more fields.

Just to make sure that there are no confusions, I'll provide a very simple example. Suppose I am using SQL*Loader and there is a record with FIRST_NAME='JOHN' and LAST_NAME='SMITH'.

Subsequent records with FIRST_NAME='JOHN' will be accepted. Subsequent records with LAST_NAME='SMITH' will be accepted.

However, any record containing JOHN SMITH will be rejected for violating the constraint.

TIA, -Ramon F Herrera Received on Wed Jan 26 2005 - 06:25:50 CST

Original text of this message

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