DROP TABLE IF EXISTS `order`; CREATE TABLE `order` ( `order_id` int(11) NOT NULL AUTO_INCREMENT, `order_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `order_product_addnumber` int(11) NOT NULL, PRIMARY KEY (`order_id`) USING BTREE, ) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;的错误是什么
时间: 2023-10-21 08:03:41 浏览: 72
数据库脚本OrderDB
这段语句有一个错误。在创建`order`表的语句中,最后也是有一个逗号,导致语法错误。正确的语句应该是:
```
DROP TABLE IF EXISTS `order`;
CREATE TABLE `order` (
`order_id` int(11) NOT NULL AUTO_INCREMENT,
`order_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`order_product_addnumber` int(11) NOT NULL,
PRIMARY KEY (`order_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
```
阅读全文