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这些。
参考:
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。