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

Home -> Community -> Usenet -> c.d.o.misc -> dups in table, need constraint clause

dups in table, need constraint clause

From: Michael Hill <hillmw_at_ram.lmtas.lmco.com>
Date: Wed, 19 Mar 2003 16:32:15 -0600
Message-ID: <3E78EFEE.FCBEB578@ram.lmtas.lmco.com>


I have this table that I created:

create table event_vip (
vip_event_id number CONSTRAINT fk_vip_event_id REFERENCES event_root(event_id),
org_id number CONSTRAINT fk_org_id REFERENCES event_lvl(org_id) )

I found that I have dup values in there like:

vip_event_id org_id

3                     5
3                     5

Both 3 exists in the other table as well as 5. I guess I need to do an alter command using both fields to get uniqueness like:

alter table event_vip add primary key (vip_event_id, org_id) (which i tried and it works ......)

but can i include this constraint somewhere in the table creation sql?

Mike Received on Wed Mar 19 2003 - 16:32:15 CST

Original text of this message

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