使用我的SQL代码不断收到此错误

时间:2014-04-06 07:23:15

标签: mysql sql forms login

错误说:

#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 '' at line 9

我的查询:

CREATE TABLE `login`.`login`(
`id` SERIAL NOT NULL,
`user` VARCHAR(20)NOT NULL,
`pass` VARCHAR(30) NOT NULL,
PRIMARY KEY(`id`),
UNIQUE(
`user`,
`pass`
)

1 个答案:

答案 0 :(得分:1)

尝试这个

CREATE TABLE `login`(
`id` INT( 11 ) AUTO_INCREMENT NOT NULL,
`user` VARCHAR(20)NOT NULL,
`pass` VARCHAR(30) NOT NULL,
PRIMARY KEY(`id`),
UNIQUE(`user`,`pass`)
)