mysql 如何用sql语句查询表的所有列名

mysql怎么用sql语句查询出某张表的所有列名,以及表有多少列,帮帮忙,谢谢了

SHOW COLUMNS FROM 表名;

select COLUMN_NAME from information_schema.columns where table_name='b'

select count(*) from information_schema.COLUMNS WHERE TABLE_SCHEMA='a' and table_name=‘b’

a是库名,b是表明

select column_name from information_schema.columns where table_name=''表名;

图片说明

select column_name from information_schema.columns where table_name='表名';图片说明

show tables;
select * from 表名

show colums from [tablename]