mysql 怎样查询一个表有多少个字段

2025-05-09 21:55:36
推荐回答(1个)
回答1:

select count(*) from information_schema.COLUMNS where TABLE_SCHEMA='test' and table_name='ceshi' 'test' 那个是库名,你替换一下 'ceshi'那个是表名,你也替换你想查找的表名