#1064 - 您的SQL语法出错;查看与MySQL服务器版本对应的手册,以便在'EXIST
users
附近使用正确的语法(id
int(11)NOT NULL AUTO_INCREMENT,username
varchar(第1行的255')
CREATE TABLE IF NOT EXIST `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) NOT NULL,
`first_name` varchar(255) NOT NULL,
`last_name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(32) NOT NULL,
`sign_up_date` date NOT NULL,
`activated` enum('0','1') NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
答案 0 :(得分:1)
EXISTS!
CREATE TABLE IF NOT EXISTS users ( id int(11) NOT NULL AUTO_INCREMENT, username varchar(255) NOT NULL, first_name varchar(255) NOT NULL, last_name varchar(255) NOT NULL, email varchar(255) NOT NULL, password varchar(32) NOT NULL, sign_up_date date NOT NULL, activated enum('0','1') NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
答案 1 :(得分:1)
您的sql中存在语法错误:
EXIST
应该是
EXISTS