建表语句出错
大家能不能帮我看看这两个建表语句有甚么错误 为什么报下面的错误程序代码:
create table order( orderid integer primary key, name varchar(32) not null, finished integer not null, cost double, cardno varchar(16), dates timestamp, userid varchar(16) references user(userid), statusid integer references orderstatus(statusid), paywayid integer references payway(paywayid) ); create table OrderLine( lineid integer primary key, orderid integer references order(orderid), productid bigint (16) references product(productid), amount integer not null );
程序代码:
Script line: 50 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order( orderid integer primary key, name varchar(32) not null, ' at line 1 Script line: 62 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order(orderid), productid bigint (16) references product(productid), ' at line 3