Help for this page

Select Code to Download


  1. or download this
    CREATE PROCEDURE [dbo].[paging_example]
      @slice_size int = 0, -- ROWCOUNT 0 will return all results
    ...
    order by buffer.sort_id
    
    GO
    
  2. or download this
    CREATE PROCEDURE [dbo].[paging_example]
      @slice_size int = 0, -- ROWCOUNT 0 will return all results
    ...
    option (loop join, force order)
    
    GO