select top 3 *
from (select top 4 infoid,title,subjectid,forumid,imagepath from tblinfomation WHERE ((imagepath<>'') and SubjectID LIKE '%229%') order by publishdate desc)order by publishdate asc

解决方案 »

  1.   

    sql="select infoid,title,subjectid,forumid,imagepath from tblinfomation WHERE imagepath<>'' and SubjectID LIKE '%229%' and infoid not in (select top 4 infoid from tblinfomation where imagepath<>'' and SubjectID LIKE '%229%') order by publishdate desc"
      

  2.   

    sql="select infoid,title,subjectid,forumid,imagepath from tblinfomation WHERE imagepath<>'' and SubjectID LIKE '%229%' and infoid not in (select top 4 infoid from tblinfomation where imagepath<>'' and SubjectID LIKE '%229%' order by publishdate desc) order by publishdate desc"