Home >Database >Mysql Tutorial >mysql 创建表 creat table实例

mysql 创建表 creat table实例

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 09:58:181563browse

实例一:创建最基本的表(下面创建了一个manong表)

<code>CREATE TABLE manong(
    id int not null,
    category char(20)
);</code>

 

实例二:创建带主键(primary key)的表

<code>CREATE TABLE manong(
    id int not null primary key,
    category char(20)
);</code>

上面实例创建了一个mangnong表,分别有id和category两个字段,其中id为主键。

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