为什么这个mysql代码有错误?
我在使用这个mysql代码时看到错误,为什么为什么这个mysql代码有错误?,mysql,sql,Mysql,Sql,我在使用这个mysql代码时看到错误,为什么 CREATE TABLE books ( id int(6) unsigned NOT NULL auto_increment, title varchar(100) NOT NULL default '', author varchar(100) NOT NULL default '', price decimal(3,2) NOT NULL default '0.00', PRIMARY
CREATE TABLE books (
id int(6) unsigned NOT NULL auto_increment,
title varchar(100) NOT NULL default '',
author varchar(100) NOT NULL default '',
price decimal(3,2) NOT NULL default '0.00',
PRIMARY KEY (id)
) TYPE=MyISAM;
INSERT INTO books VALUES (1, 'Where God Went Wrong', 'Oolon Colluphid', '24.99');
INSERT INTO books VALUES (2, 'Some More of God\'s Greatest Mistakes', 'Oolon Colluphid', '17.99');
INSERT INTO books VALUES (3, 'Who Is This God Person Anyway?', 'Oolon Colluphid', '14.99');
1064-您的SQL语法有错误;检查手册
对应于您的MySQL服务器版本,以便使用正确的语法
第7行“类型=MyISAM”附近
使用
引擎
而不是类型
。类型早已废弃。替换
TYPE=MyISAM;
与
它不再是类型
。改用名称引擎
:
TYPE keyword is depreciated (since 5.0) and not supported in MySQL5.5
您应该使用引擎
而不是类型
这个错误告诉你到底出了什么问题。
TYPE keyword is depreciated (since 5.0) and not supported in MySQL5.5