6个表(用1,2,3,4,5,6代替)中时间(fabushijian)最靠前的5条信息名(title)
谢谢,速度哦,马上揭!!!
------解决方案--------------------------------------------------------
create view view_001 as
select top 5 * from 1 order by fabushijian
union
select top 5 * from 2 order by fabushijian
union
select top 5 * from 3 order by fabushijian
union
select top 5 * from 4 order by fabushijian
union
select top 5 * from 5 order by fabushijian
union
select top 5 * from 6 order by fabushijian
select top 5 * from view_001 order by fabushijian
------解决方案--------------------------------------------------------
SELECT TITLE FROM (SELECT TOP 5 TITLE FROM 1 ORDER BY FABUSHIJIAN DESC) T
UNION ALL
SELECT TITLE FROM (SELECT TOP 5 TITLE FROM 2 ORDER BY FABUSHIJIAN DESC) T
UNION ALL
SELECT TITLE FROM (SELECT TOP 5 TITLE FROM 3 ORDER BY FABUSHIJIAN DESC) T
UNION ALL
SELECT TITLE FROM (SELECT TOP 5 TITLE FROM 4 ORDER BY FABUSHIJIAN DESC) T
UNION ALL
SELECT TITLE FROM (SELECT TOP 5 TITLE FROM 5 ORDER BY FABUSHIJIAN DESC) T
UNION ALL
SELECT TITLE FROM (SELECT TOP 5 TITLE FROM 6 ORDER BY FABUSHIJIAN DESC) T