参考 : mysql 查询表字段说明 - 不再犯错 - 博客园
select
table_schema as '库名',table_name as '表名',column_name as '字段名',column_type as '字段类型',column_comment as '字段说明' ,
IS_NULLABLE '是否可为空' from information_schema.columns
where table_schema = 'db_test1'
and table_name = 'tab_test1' ;