Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> How to create a uniqueness constraint based on two fields?
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
![]() |
![]() |