Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-02270 Error

580861Mar 10 2008 — edited Mar 10 2008
I got ORA-02270 Error when tried to add foreign key on a detail table:

CREATE TABLE supplier
( supplier_id numeric(10) not null,
supplier_name varchar2(50) not null,
contact_name varchar2(50) ,
insertedate date not null,
CONSTRAINT supplier_pk PRIMARY KEY (supplier_id, insertedate );

);

CREATE TABLE sub_supplier
( supplier_id numeric(10) not null,
sub_supplier_id numeric(10) not null,
insertedate date not null,
other_details varchar2(10),
CONSTRAINT product_pk (supplier_id , sub_supplier_id, insertedate )
CONSTRAINT fk_supplier FOREIGN KEY (supplier_id)
REFERENCES supplier (supplier_id)
);

insertedate is actual system timestamp. I don't think it can be used as a reference.

Any idea how can I resolve this error?

Thank you.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 7 2008
Added on Mar 10 2008
1 comment
380 views