1. 程式人生 > >mysql檢視某個表的表定義

mysql檢視某個表的表定義

Describe(desc) 表名

mysql> desc student;
+-------------+-------------+------+-----+---------+-------+
| Field       | Type        | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| StudentID   | int(11)     | NO   | PRI | NULL    |       |
| StudentName | varchar(20) | NO   |     | NULL    |       |
| StudentType | int(11)     | NO   |     | NULL    |       |
+-------------+-------------+------+-----+---------+-------+
3 rows in set (0.01 sec)