2012-12-07 23 views
1

複合鍵這是我的代碼:甲骨文:請包含三個Foregin鍵

create table orderline 
(
Order_No number(4) constraint orderno_fk references order_detail(Order_No), 
Product_Code varchar2(6) constraint productcode2_fk references product(Product_Code), 
Product_Size char(1) constraint productsize_fk references product_stock(Product_Size), 
Product_Quantity number(4) not null 
constraint orderline_comp primary key (Order_No,Product_Code, Product_Size) 
); 

我的錯誤(與前「訂單」左括號下方的星):

ERROR at line 7: 
ORA-00907: missing right parenthesis 
+0

您使用的是什麼RDBMS? – Smit

回答

0

您需要,之前constraint orderline...