南方随歌起 发表于 2016-6-18 13:29:02

请教MySQL语法知识

CREATE TABLE 'ci_sessions' (
'session_id' varchar(40)COLLATE utf8_bin NOT NULL DEFAULT '0',
'ip_address' varchar(16)COLLATE utf8_bin NOT NULL DEFAULT '0',
'user_agent' varchar(120) COLLATE utf8_bin DEFAULT NULL,
'last_activity' int(10) unsigned NOT NULL DEFAULT '0',
'user_data' text COLLATE utf8_bin NOT NULL,
PRIMARY KEY ('session_id'),
KEY 'last_activity_idx' ('last_activity')
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

错误
#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 ''ci_sessions' (
'session_id' varchar(40) CHARACTER SET utf8 COLLATE utf8_bin NO' at line 1

南方随歌起 发表于 2016-6-18 16:01:22

2小时惨案,已解决
页: [1]
查看完整版本: 请教MySQL语法知识