在MySql中查询不同的列名

在MySql中查询不同的列名,mysql,Mysql,如果我有以下表格: [table_1] id name address zip [table_2] id power_source zip 我需要一个将返回不同列名的查询: id name address power_source zip 表的数量很多,但确切数量未知。我需要整个数据库的不同列名 信息模式对于此类信息非常有用 SELECT DISTINCT `column_name` FROM `information_schema`.`columns` WHERE table_sc

如果我有以下表格:

[table_1]
id
name
address
zip 

[table_2]
id
power_source
zip
我需要一个将返回不同列名的查询:

id
name
address
power_source
zip

表的数量很多,但确切数量未知。我需要整个数据库的不同列名

信息模式对于此类信息非常有用

SELECT DISTINCT `column_name` 
FROM `information_schema`.`columns` 
WHERE table_schema = "[my schema name]";

我喜欢问题回答得这么快!但我讨厌我不能在堆栈中再标记11分钟!谢谢你!