求一SQL语句,双表联查
A表:
id name
----------
01 aaa
02 bbb
B表:
id name
-----------
11 ccc
12 ddd
查询结果:
id name
----------
01 aaa
02 bbb
11 ccc
22 ddd
这个语句怎么写,谢谢
------解决方案--------------------select * from (select * from a
union all
select * from b ) a order by id