这个建表语句哪里有问题?
程序员文章站
2024-01-27 20:24:46
...
create table blog(id int primary key not null auto_increment,type varchar(10),name varchar(10),num int(11),site varchar(10),content varchar(100))TYPE=innoDB;
回复内容:
create table blog(id int primary key not null auto_increment,type varchar(10),name varchar(10),num int(11),site varchar(10),content varchar(100))TYPE=innoDB;
CREATE TABLE `blog`
(
`id` INT NOT NULL auto_increment,
`type` VARCHAR(10) NULL,
`name` VARCHAR(10) NULL,
`num` INT(11) NULL,
`site` VARCHAR(10) NULL,
`content` VARCHAR(100) NULL,
PRIMARY KEY (`id`)
)
engine=innodb
DEFAULT CHARACTER SET=utf8
COLLATE=utf8_general_ci;
create table blog(
id int primary key not null auto_increment,
type varchar(10),
name varchar(10),
num int(11),
site varchar(10),
content varchar(100)
)engine=innoDB;
用ENGINE = Innodb代替TYPE = InnoDB。TYPE在5.1版本已经废弃了。