每个类别提取最新一条记录
SELECT id,title,news_int from news as T where ID IN(SELECT TOP 1 ID FROM news WHERE s_id=T.s_id ORDER BY id DESC)
每个类别提取最新一条记录
SELECT id,title,news_int from news as T where ID IN(SELECT TOP 1 ID FROM news WHERE s_id=T.s_id ORDER BY id DESC)
转载于:https://www.cnblogs.com/zjsimen/archive/2009/11/14/1603083.html