Foreign Keys and Primary Keys at the same time
- by Bader
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 ?