I am using a stored procedure which retrieves only 10 records per page i.e., if the user is on first page the stored procedure will retrieve first 10 records and so on. But for doing this I have used a temporary table inside the stored procedure. The stored procedure first retrieves all the records and save it in a temporary table and then it retrieves 10 records at a time from the temporary table.
Is there any other way to do this which will take less amount of time and retrieves only 10 records from database without using temporary table?
Comment