CREATE TABLE IF NOT EXISTS `user`(
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`studentName` varchar (20) NOT NULL COMMENT '用户名',
`bookArr` longtext NOT NULL COMMENT '学生预定的书籍'
PRIMARY KEY (`id`)
)ENGINE =InnoDB DEFAULT charset =utf8 COMMENT='用户信息';
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
错误
静态分析:
分析时发现3个错误。
应该是有逗号或结束括号。 (near "(" at position 225)
不应出现的开始声明。 (near "`id`" at position 226)
无法识别的声明形式。 (near "ENGINE" at position 234)
SQL 查询: 复制
-- 用户信息 CREATE TABLE IF NOT EXISTS `user`( `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `studentName` varchar (20) NOT NULL COMMENT '用户名', `bookArr` longtext NOT NULL COMMENT '学生预定的书籍' PRIMARY KEY (`id`) )ENGINE =InnoDB DEFAULT charset =utf8 COMMENT='用户信息';
MySQL 返回: 文档
#1064 - 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 '(`id`)
)ENGINE =InnoDB DEFAULT charset =utf8 COMMENT='用户信息'' at line 6
求帮忙改正