select top 10 id,topicID,subID,replyTitle,replyUser,replyTime from Reply a where replyUser = '名字'  and 
     exists(select max(id) from Reply b where a.id=b.id group by replytitle) order by replyTime desc 

解决方案 »

  1.   


    select top 10 id,topicID,subID,replyTitle,replyUser,replyTime from Reply a where replyUser = '名字'  and 
    not exists(select 1 from Reply b where a.id<b.id and a.replyTitle=b.replyTitle) order by replyTime desc 
      

  2.   


    select top 10 id,topicID,subID,replyTitle,replyUser,replyTime from Reply a where replyUser = '名字' 
    and not exists(select 1 from reply where replytitle=a.replytitle and replytime>a.replytime)
    order by replyTime desc
      

  3.   

    执行后...为啥还是一样的捏?弱弱的问一句... Reply a Reply b 是?