取不重複的下面N筆資料

  • 191
  • 0

筆記


        
Select Top N * From table
where id Not In 
    (
       Select Top (start - 1) id From table Where 
       order by field DESC
    )
order by field DESC

-- N:取N筆
-- Start:從第Start開始取