select count(*) from information_schema.columns where table_schema='db' and table_name='tb'
db是表所在的数据库名称,
tb是要查询的表名
posted on 2016-06-28 16:43 风雨小站 阅读(163) 评论(0) 收藏 举报