Foreign Keys and Primary Keys at the same time

Posted by Bader on Stack Overflow See other posts from Stack Overflow or by Bader
Published on 2010-12-26T20:32:44Z Indexed on 2010/12/26 20:53 UTC
Read the original article Hit count: 223

Filed under:
|

hello , i am trying to create table (orderdetails) , the table has two FKs and PKs at the same keys

here is my code

            create table OrderDetails2 (
    PFOrder_ID Number(3)
    PFProduct_ID Number(3) 
    CONSTRAINT PF PRIMARY KEY (PFOrder_ID,PFProduct_ID),
    CONSTRAINT FK_1 FOREIGN KEY (PFProudct_ID) REFERENCES Product(Product_ID),
    CONSTRAINT FK_2 FOREIGN KEY (PFOrder_ID) REFERENCES Orderr(Order_ID)

);

i am using Oracle express , a problem pops when i run the code , here is it

ORA-00907: missing right parenthesis

what is the problem ?

© Stack Overflow or respective owner

Related posts about sql

Related posts about Oracle