i All, I have 20,000 records in my database Is there any way i can run a sql query that can fetch the first 5000 row, then the next 5000 row and so on? I do not want to fetch 20,000 rows at a time. Plz help. THanx
what db do you use ? on sql server use top() on sql server 2005 you can use use row_number() on oracle rowcount() no idea on mysql..
I use ms sql 2000 Top or set rowcount is of no use, since I do not have a id column. MYSQL uses LIMIT 0,5000 and I want something similar to it
There is a way but I never used. Check these pages. http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=850&lngWId=5 http://sillytech.com/threads/626 You may create a stored procedure or function on mssql with this method. But even they say there is no performance problem on 7 million records, I think there will be a performance problem.