How to display data Page Wise in SQL?
Answers
Answered by
0
ry this one -
CREATE PROCEDURE [dbo].[GetAllContacts] ( @searchVal VARCHAR(500) , @from INT , @row_count INT = 20 ) AS BEGIN SELECT DISTINCT (Id) AS Id , FirstName , LastName , address , Tel_no FROM tblContact WHERE FirstName LIKE '%' + @searchVal + '%' OR LastName LIKE '%' + @searchVal + '%' ORDER BY LastName OFFSET @from ROWS FETCH NEXT @row_count ROWS ONLY; END
CREATE PROCEDURE [dbo].[GetAllContacts] ( @searchVal VARCHAR(500) , @from INT , @row_count INT = 20 ) AS BEGIN SELECT DISTINCT (Id) AS Id , FirstName , LastName , address , Tel_no FROM tblContact WHERE FirstName LIKE '%' + @searchVal + '%' OR LastName LIKE '%' + @searchVal + '%' ORDER BY LastName OFFSET @from ROWS FETCH NEXT @row_count ROWS ONLY; END
Similar questions