请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

无法创建表

直接用老师给的 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贴下我看看

0 回复 有任何疑惑可以回复我~
  • 提问者 张逸安 #1
    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 ')ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8' at line 18
    回复 有任何疑惑可以回复我~ 2018-05-22 13:08:25
  • 提问者 张逸安 #2
    #生活服务表
    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;
    回复 有任何疑惑可以回复我~ 2018-05-22 13:08:48
  • 提问者 张逸安 #3
    问题 解决了, 老师你给的sql 文件 o2o_user 表,多了个“,”
    回复 有任何疑惑可以回复我~ 2018-05-22 17:37:58
提问者 张逸安 2018-05-22 13:09:31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#生活服务表
CREATE TABLE `o2o_category`(
    `id` int(10) unsigned NOT NULL auto_increment,
    `namevarchar(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,
    `namevarchar(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;


0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号