无法创建表
来源:2-4 将表的结构导入数据库中

张逸安
2018-05-22
直接用老师给的 sql 文件报错, 怎么回事?
ERROR 1064 (42000): 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
写回答
2回答
-
您好。 sql贴下我看看
042018-05-22 -
张逸安
提问者
2018-05-22
#生活服务表 CREATE TABLE `o2o_category`( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(50) NOT NULL DEFAULT '', `parend_id` int(10) unsigned NOT NULL default 0, `listorder` int(8) unsigned NOT NULL default 0, `status` tinyint(1) NOT NULL DEFAULT 0, `create_time` int(10) unsigned NOT NULL default 0, `update_time` int(10) unsigned NOT NULL default 0, PRIMARY KEY (`id`), KEY parend_id(`parend_id`) )ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; #城市表 CREATE TABLE `o2o_city`( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(50) NOT NULL DEFAULT '', `uname` varchar(50) NOT NULL DEFAULT '', `parend_id` int(10) unsigned NOT NULL default 0, `listorder` int(8) unsigned NOT NULL default 0, `status` tinyint(1) NOT NULL DEFAULT 0, `create_time` int(10) unsigned NOT NULL default 0, `update_time` int(10) unsigned NOT NULL default 0, PRIMARY KEY (`id`), KEY parend_id(`parend_id`), UNIQUE KEY uname(`uname`) )ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
00
相似问题