日期:2014-05-17 浏览次数:20487 次
SELECT top 36 id,roomName,bgImg,qqImg,listCount FROM room where [status]=2 ORDER BY listCount DESC,id asc
SELECT DISTINCT TOP 36
id ,
roomName ,
bgImg ,
qqImg ,
listCount
FROM ( SELECT id ,
roomName ,
bgImg ,
qqImg ,
listCount
FROM room
WHERE id = 1
UNION ALL
SELECT TOP 37
id ,
roomName ,
bgImg ,
qqImg ,
listCount
FROM room
WHERE [status] = 2
ORDER BY listCount DESC ,
id ASC
) T
ORDER BY listcount ASC