MySQL中怎么查询一张表的列数

select count(1) from information_schema.columns where table_schema='dbname' and table_name='tbname;

原文地址:https://www.cnblogs.com/toSeeMyDream/p/5575249.html