显示表结构——desc
# 显示表结构
desc <TableName>;
1
or
describe <TableName>;
1
Example:
mysql> desc students;
+---------+--------------+------+-----+----------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------+--------------+------+-----+----------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| name | varchar(30) | NO | | NULL | |
| age | int(11) | YES | | NULL | |
| phone | varchar(20) | YES | | NULL | |
| address | varchar(100) | YES | | 暂时未知 | |
+---------+--------------+------+-----+----------+----------------+
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
编辑 (opens new window)
上次更新: 2022/12/03, 17:31:39