一、desc table_name 返回的总行数就是字段总数
desc anjie_work; # desc table_name
explain anjie_work;#explain table_name
image.png
二、SELECT COUNT(*) FROM information_schema.COLUMNS
WHERE table_name='table_name'
SELECT COUNT(*) FROM information_schema.`COLUMNS` WHERE table_name='anjie_work' #
image.png
网友评论