Skip to content

Instantly share code, notes, and snippets.

@dodangquan
Last active August 29, 2015 14:27
Show Gist options
  • Save dodangquan/bdbda1a6fcaee3dc3312 to your computer and use it in GitHub Desktop.
Save dodangquan/bdbda1a6fcaee3dc3312 to your computer and use it in GitHub Desktop.
declare @current_offset int = 0;
declare @current_increment int = 2;
SET @current_offset = @current_offset + @current_increment;
SELECT * FROM [Sinh Vien]
ORDER BY [Ten Sinh Vien]
OFFSET @current_offset rows
fetch next @current_increment ROWS ONLY;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment