1、查看标的创建语句
SHOW CREATE TABLE table_name;
2、简单查看表结构
DESC table_name;
3、查询表结构详细信息——包括列注释
select * from information_schema.columns where table_schema = 'db' #表所在数据库
and table_name = 'tablename' ; #你要查的表
4、查询表结构部分详细信息——包括列注释
select column_name,
column_comment from information_schema.columns where table_schema ='db' and
table_name = 'tablename' ;
5、查看表的信息
select table_name,table_comment from information_schema.tables where table_schema = 'db' and table_name ='tablename'
