日期:2014-05-17  浏览次数:20337 次

如何查询出两个表中的最新10条记录?
A表 字段 id,title,gxtime
B表 字段 id,title,gxtime

根据gxtime排序获得两个表组合的最新10条记录

------解决方案--------------------
SQL code

select top 10 * from (
select * from A
union all select * from B) t
order by t.gxtime desc