提交 b87b0e3a 编写于 作者: M Mars Liu

remove int length

上级 987f7be0
......@@ -7,7 +7,7 @@ Joe 需要重建一个 id 为自增字段的 goods_category 。他已经删除
```mysql
CREATE TABLE goods_category
(
id INT(11) PRIMARY KEY AUTO_INCREMENT,
id INT PRIMARY KEY AUTO_INCREMENT,
category VARCHAR(30),
remark VARCHAR(100)
) ENGINE INNODB;
......@@ -20,7 +20,7 @@ CREATE TABLE goods_category
```mysql
CREATE TABLE goods_category
(
id INT(11) PRIMARY KEY SERIALS,
id INT PRIMARY KEY SERIALS,
category VARCHAR(30),
remark VARCHAR(100)
) ENGINE INNODB;
......@@ -31,7 +31,7 @@ CREATE TABLE goods_category
```mysql
CREATE TABLE goods_category
(
id INT(11) ,
id INT ,
category VARCHAR(30),
remark VARCHAR(100),
PRIMARY KEY ID AUTO_INCREMENT
......@@ -44,7 +44,7 @@ CREATE TABLE goods_category
```mysql
CREATE TABLE goods_category
(
id INT(11) PRIMARY KEY,
id INT PRIMARY KEY,
category VARCHAR(30),
remark VARCHAR(100)
) ENGINE INNODB;
......@@ -55,7 +55,7 @@ CREATE TABLE goods_category
```mysql
CREATE TABLE goods_category
(
id INT(11) PRIMARY KEY SERIALS,
id INT PRIMARY KEY SERIALS,
category VARCHAR(30),
remark VARCHAR(100)
) ENGINE INNODB;
......
......@@ -7,7 +7,7 @@ Joe 想要在 goods 数据库创建一个 goods_category 表,管理商品的
```mysql
CREATE TABLE goods_category
(
id INT(11) PRIMARY KEY ,
id INT PRIMARY KEY ,
category VARCHAR(30),
remark VARCHAR(100)
);
......@@ -20,7 +20,7 @@ CREATE TABLE goods_category
```mysql
MAKE TABLE goods_category
(
id INT(11) PRIMARY KEY ,
id INT PRIMARY KEY ,
category VARCHAR(30),
remark VARCHAR(100)
);
......@@ -31,7 +31,7 @@ MAKE TABLE goods_category
```mysql
DROP TABLE goods_category
(
id INT(11) PRIMARY KEY,
id INT PRIMARY KEY,
category VARCHAR(30),
remark VARCHAR(100)
);
......@@ -42,7 +42,7 @@ DROP TABLE goods_category
```mysql
SAVE TABLE goods_category
(
id INT(11) PRIMARY KEY,
id INT PRIMARY KEY,
category VARCHAR(30),
remark VARCHAR(100)
);
......@@ -53,7 +53,7 @@ SAVE TABLE goods_category
```mysql
ADD TABLE goods_category
(
id INT(11) PRIMARY KEY,
id INT PRIMARY KEY,
category VARCHAR(30),
remark VARCHAR(100)
);
......@@ -64,7 +64,7 @@ ADD TABLE goods_category
```mysql
PUT TABLE goods_category
(
id INT(11) PRIMARY KEY,
id INT PRIMARY KEY,
category VARCHAR(30),
remark VARCHAR(100)
);
......
......@@ -7,7 +7,7 @@ Joe 需要确保 goods_category 表的存储引擎为 innodb ,那么建表语
```mysql
CREATE TABLE goods_category
(
id INT(11),
id INT,
category VARCHAR(30),
remark VARCHAR(100)
) ENGINE=INNODB;
......@@ -20,7 +20,7 @@ CREATE TABLE goods_category
```mysql
CREATE TABLE goods_category
(
id INT(11),
id INT,
category VARCHAR(30),
remark VARCHAR(100)
) as INNODB;
......@@ -31,7 +31,7 @@ CREATE TABLE goods_category
```mysql
WITH ENGINE=INNODB CREATE TABLE goods_category
(
id INT(11),
id INT,
category VARCHAR(30),
remark VARCHAR(100)
);
......@@ -42,7 +42,7 @@ WITH ENGINE=INNODB CREATE TABLE goods_category
```mysql
SAVE TABLE goods_category
(
id INT(11),
id INT,
category VARCHAR(30),
remark VARCHAR(100)
) AS INNODB;
......@@ -53,7 +53,7 @@ SAVE TABLE goods_category
```mysql
CREATE TABLE goods_category
(
id INT(11),
id INT,
category VARCHAR(30),
remark VARCHAR(100)
) INNODB;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册