Thursday, 27 July 2017

Sql server paging

// SQL server

Declare @PageNo int=5,@pageSize int=5

select top (@pageSize) * from(select ROW_NUMBER() OVER(ORDER BY hhguid ASC) as line, * from tblhh where createdby=94)mm

where line > (@PageNo - 1) * @pageSize

No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...