Home >Backend Development >PHP Tutorial >这个建表语句哪里有问题?

这个建表语句哪里有问题?

WBOY
WBOYOriginal
2016-06-06 20:18:141221browse

<code>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;</code>

回复内容:

<code>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;</code>

<code>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;</code>

<code>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;</code>

用ENGINE = Innodb代替TYPE = InnoDB。TYPE在5.1版本已经废弃了。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn