1、查询表结构
desc tablename;
show full columns from tablename;
select * from information_schema.columns where table_name=’tablename’;
2、查询表相关信息
select * from information_schema.tables where table_name=’tablename’;
3、查询列编码
select table_schema,table_name,column_name,character_set_name,collation_name from information_schema.columns where table_name=’tablename’;
4、查询表编码
select table_name,table_collation from information_schema.tables where table_name=’tablename’;