表名你自己替换一下 select `COLUMN_NAME` AS `ColumnName` from information_schema.columns where table_schema = database() and table_name = 't1' UNION select `COLUMN_NAME` AS `ColumnName` from information_schema.columns where table_schema = database() and table_name = 't2' select `COLUMN_NAME` AS `ColumnName` from information_schema.columns where table_schema = database() and table_name = 't3'
select
`COLUMN_NAME` AS `ColumnName`
from information_schema.columns
where table_schema = database()
and table_name = 't1'
UNION
select
`COLUMN_NAME` AS `ColumnName`
from information_schema.columns
where table_schema = database()
and table_name = 't2'
select
`COLUMN_NAME` AS `ColumnName`
from information_schema.columns
where table_schema = database()
and table_name = 't3'