I'm trying to work out the most efficient way of performing a query. What i want is for the rest of the database starting at a certain letter, and ordered alphabetically. So for example this command:
SELECT name FROM people WHERE name > 'C%' ORDER BY people however i need to apply a limit and my application will find this easier if i know of the offset of where the first row is returned. So i think i can get this with: SELECT COUNT name FROM people WHERE name < 'C%' ORDER BY people but this is obviously scanning the database twice for the same information, the first query knows the offset of where is starts but i can't think of how to get the information out of the query. Any ideas? Or am i completely barking up the wrong tree? Thanks Andrew P.S. Is it me or is there no way to do case insenstive commands?