数据库版本
来源:2-4 将表的结构导入数据库中

踩了牛奶的猫丶
2017-03-24
我用的mysql5.7.14跟着老师建的数据库语法有很多问题,尤其KEY那在新版数据库里面怎么加进去
写回答
3回答
-
您好,你把int(11) 切换成int(10) 试试
012017-03-25 -
singwa
2017-03-24
您好, 提示什么错误。
012017-03-24 -
踩了牛奶的猫丶
提问者
2017-03-24
CREATE TABLE 'o2o_city1'(
'id' int(11) UNSIGNED NOT NULL auto_increment,
'name' VARCHAR(50) NOT NULL DEFAULT '',
'uname' VARCHAR(50) NOT NULL DEFAULT '',
'parent_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(11) UNSIGNED NOT NULL DEFAULT 0,
'update_time' int(11) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY ('id'),
KEY parent_id('parent_id'),
UNIQUE KEY uname('uname')
)ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;每个表都是
00
相似问题