Oracle: Make a composite Key containing three Fore

2019-07-25 09:34发布

This is my code:

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)
);

I get the error (with the star underneath the left parenthesis before 'Order'):

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

1条回答
疯言疯语
2楼-- · 2019-07-25 10:01

You need a , before the constraint orderline...

查看更多
登录 后发表回答