CREATE TABLE order(
account char(20),
bookId char(20),
orderTime char(20),
backTime char(20),
PRIMARY KEY(account, bookId, orderTime),
FOREIGN KEY(account) REFERENCE user(account),
FOREIGN KEY(bookId) REFERENCE book(bookId)
);为什么我导入到mysql中会报错
ERROR 1064 (42000): 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
(
account char(20),
bookId char(20),
orderTime char(20),
backTime char(' at line 1
account char(20),
bookId char(20),
orderTime char(20),
backTime char(20),
PRIMARY KEY(account, bookId, orderTime),
FOREIGN KEY(account) REFERENCE user(account),
FOREIGN KEY(bookId) REFERENCE book(bookId)
);为什么我导入到mysql中会报错
ERROR 1064 (42000): 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
(
account char(20),
bookId char(20),
orderTime char(20),
backTime char(' at line 1
另外不建议用关键字做为表名,字段名。