Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: open
select * from table
Problem is that for large records it will take lots of time to run this query..
Please suggusts me some better way to do this....
select * from table limit 10
// Means record 0 to 10 //
thats so normal right ? yea but this is the trick
select * from table limit 10,20
that means select 20 records after record 10, i think ACCESS database doesnt allow two parameters for the LIMIT keyword, not sure about SQL Server.
[edited by: Anyango at 7:22 pm (utc) on Sep. 9, 2008]
I am using MSSQL will it work for that also?
See the following for a kludgy workaround (works with the Pubs database):
select * from (
select top 10 emp_id,lname,fname from (
select top 30 emp_id,lname,fname
order by lname asc
) as newtbl order by lname desc
) as newtbl2 order by lname asc
(The article covers Classic ASP, but the SQL bits apply to .Net and the stored procedure at the end may be a good solution)