让我们首先创建一个演示表mysql> create table excludeCertainColumnsDemo
-> (
-> StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
-> StudentName varchar(100),
-> StudentAge int,
-> StudentMarks int,
-> StudentAddress varchar(200)
-> );
现在,您可以在desc命令的帮助下检查表的描述。查询如下-mysql> desc excludeCertainColumnsDemo;
以下是输出+----------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------+--------------+------+-----+---------+----------------+
| StudentId | int(11) | NO | PRI | NULL | auto_increment |
| StudentName | varchar(100) | YES | | NULL | |
| StudentAge | int(11) | YES | | NULL | |