SET NAMES utf8mb4;
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户唯一id',
`name` VARCHAR(32) DEFAULT NULL COMMENT '用户名',
`email` VARCHAR(32) DEFAULT NULL COMMENT '电子邮箱',
`password` VARCHAR(32) DEFAULT NULL COMMENT '密码',
) ENGINE=INNODB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`user_id` INT(11) UNSIGNED NOT NULL COMMENT '用户id',
`name` VARCHAR(32) NOT NULL COMMENT '用户角色名',
PRIMARY KEY (`id`),
UNIQUE KEY `user_id_and_name` (`user_id`,`name`) USING BTREE,
KEY `user_id` (`user_id`)
) ENGINE=INNODB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4;
老师我这么写的SQL有什么问题吗,为什么一直报错:
错误码: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4' at line 6