mysql查询某个表的所有列名:
select group_concat(column_name) from information_schema.COLUMNS where table_name='你的表名' and table_schema='你的数据库名';
执行结果

本文介绍如何使用SQL查询从information_schema.COLUMNS表中获取指定数据库和表名的所有列名,这对于数据库管理或开发人员来说是一项实用技能。
mysql查询某个表的所有列名:
select group_concat(column_name) from information_schema.COLUMNS where table_name='你的表名' and table_schema='你的数据库名';
执行结果

2329
776
1056
5139
1682

被折叠的 条评论
为什么被折叠?