关于MYSQL 创建数据表的问题
我是要实现id的自动编号(类似于ACCESS中的)而且为主键的功能CREATETABLE`school`.`adminuser`(`id`INTNOTNULL,`user...
我是要实现 id的自动编号(类似于ACCESS中的)而且为主键的功能
CREATE TABLE `school`.`adminuser` (
`id` INT NOT NULL ,
`username` VARCHAR NOT NULL ,
`password` VARCHAR NOT NULL ,
INDEX ( `id` ) ,
PRIMARY KEY ( `id` ) 为什么 这行出错呢
) ENGINE = InnoDB
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 'NOT NULL ,
`password` VARCHAR NOT NULL ,
INDEX ( `id` ),
PRIMARY KEY ( `id` )' at line 4 展开
CREATE TABLE `school`.`adminuser` (
`id` INT NOT NULL ,
`username` VARCHAR NOT NULL ,
`password` VARCHAR NOT NULL ,
INDEX ( `id` ) ,
PRIMARY KEY ( `id` ) 为什么 这行出错呢
) ENGINE = InnoDB
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 'NOT NULL ,
`password` VARCHAR NOT NULL ,
INDEX ( `id` ),
PRIMARY KEY ( `id` )' at line 4 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询