Mysql 查询表字段数量

 

select count(*) from information_schema.`COLUMNS`
     where TABLE_SCHEMA='dbName'   -- 数据库名
     and TABLE_NAME='tablename';    -- 表名

 

posted @ 2019-07-19 14:36  秋香姑娘请你不要紧张  阅读(6476)  评论(0编辑  收藏  举报