Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> dups in table, need constraint clause
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
![]() |
![]() |