sql - How to return limited set of records from stored procedure from huge set of records? -
this question has reply here:
how pagination in sql server 2008 6 answersif store procedure retrieves 100 records table how homecoming 10 records each on every button click. not want homecoming 100 records @ time. need homecoming them in parts.
you can utilize like:
set @p_start_row = @p_page_no*@p_page_size set @p_end_row= @p_page_no*@p_page_size + @p_page_size select * (select *, rownum() over( order col1, ...) rownum mytable) a.rownum between @p_start_row , @p_end_row
sql sql-server-2008
No comments:
Post a Comment