查询表的字段数:
select count(*) from information_schema.COLUMNS where TABLE_SCHEMA='数据库名' and table_name='表名';
查询所有字段名跟注释:
select COLUMN_NAME,COLUMN_COMMENT from information_schema.COLUMNS where table_name = '表名';
查询表的字段数:
select count(*) from information_schema.COLUMNS where TABLE_SCHEMA='数据库名' and table_name='表名';
查询所有字段名跟注释:
select COLUMN_NAME,COLUMN_COMMENT from information_schema.COLUMNS where table_name = '表名';