Hi Christian,
Try it out .
CREATE PROCEDURE GetBranchesnyPage
@start int = 0,
@pageCount int=0
AS
BEGIN
Set NOCOUNT ON
SELECT * FROM
(
SELECT
[Id]
,[BranchName]
,[CountryCode]
, ROW_NUMBER() OVER (ORDER BY Id) AS num
FROM Branches
) AS A
WHERE num > @start and num <=(@start+@pageCount)
END
I hope it can help you
All the best