-5
SELECT something
FROM table1, table2, table
WHERE tableColumn = "tableName"
SELECT something
FROM table1, table2, table
WHERE tableColumn = "tableName"
你可以做一些疯狂,复杂的关于模式的表,如果有必要,但这应该在紧要关头:
select <something>
from table1
where
tableColumn = "tableName"
union all
select <something>
from table2
where
tableColumn = "tableName"
union all
select <something>
from table3
where
tableColumn = "tableName"
只要确保从联合中的每个查询中选择相同类型的列。
什么?你是否要求所有具有特定列名的表?您是否要求使用特定列名查找所有表的代码生成器,然后对这些表执行查询?你是否要求一个连接,其中table1,table2和table3在列中都具有相同的值? “ – CindyH 2015-04-01 22:20:05
”你是否要求所有在其中具有特定列名的表?是 – Berna 2015-04-01 22:22:16
http://stackoverflow.com/a/9180068/2589202 – paqogomez 2015-04-01 22:41:27