最常用desc,查看表的列名信息
desc table_name;
查詢建表語句獲得更多表的信息
show create table table_name;
create table `student_info` (
`student_id` int not null,
`student_name` varchar(30) not null,
`student_age` int not null
);
使用以上建表語句之后,再show create table table_name;獲得的結(jié)果:

可以看到除了我們在建表語句定義的內(nèi)容,還有ENGINE 以及 默認(rèn)的字符集 信息。
還可以用下面的語句查看表狀態(tài)的信息
show table status like 'student_info'\G
注意:student_info 用的是單引號,且語句末尾不需要分號
