create proc pro_note
@rowIndex int ,
@maxNumber int
as
with page as
(select id,row_number() over(order by id) as rowindex from note)
select note.* from note,page where note.id=page.id
and page.rowindex between (@rowIndex+1) and (@rowIndex+@maxNumber)