日期:2014-05-17 浏览次数:20473 次
SELECT TOP (@pagesize) id,(select count(commentid) from Comment where commentparentid=id and commenttype=2 ) as sum2,name,author,date,content,Cover_pic,Views_number FROM dbo.down WHERE id <= ( SELECT ISNULL(MIN(id),0) FROM ( SELECT TOP (@pagesize*(@page-1)+1) id FROM down ORDER BY id Desc ) A ) ORDER BY id Desc