num 是我随便写的一个他们需要做条件的列名。具体按照你自己的列名来写。
test_Table 这个是给联合起来查询的表取的一个别名,随便你写什么名字都行。
select max(num)
from (
select num from TABLE_2010
union
select num fromTABLE_2011
union
select num from TABLE_2012
) as test_Table
select max(列名) from TABLE_2010,TABLE_2011,TABLE_2012
用union试试。
另外,取最大值可以用max
能