union all
select * from table1001 where price > 10 union all select * from table1002 where price > 10 union all select * from table1003 where price > 10 order by ID
列的个数要保持一致,列名可以不一样,但是对应的列的数据类型要一样。同样可以使用order by,limit这些。
参考:
union all
select * from table1001 where price > 10 union all select * from table1002 where price > 10 union all select * from table1003 where price > 10 order by ID
列的个数要保持一致,列名可以不一样,但是对应的列的数据类型要一样。同样可以使用order by,limit这些。
参考: