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

Re: How to create a uniqueness constraint based on two fields?

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 26 Jan 2005 05:56:09 -0800
Message-ID: <1106747769.057534.265250@z14g2000cwz.googlegroups.com>


Ramon, Thomas's answer will also work for the PK constraint. Multi-column keys are not fairly common and often necessary to support business rules.

In the case of names I would however suggest placeing the last_name prior to the first name since this would facilitate finding all SMITH's etc.... Also in the real world it would probably be necessary to add date of birth or hire date to decrease the possibility of running into a duplicate value for a non-duplicate person. That is the possibility of two John Smith's being employed by the company is fairly high but it is very unlikely that both were born on the same day. HTH -- Mark D Powell -- Received on Wed Jan 26 2005 - 07:56:09 CST

Original text of this message

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