SQL select first 10 or so entries from a table
Date: 14 Apr 2002 03:51:23 -0700
Message-ID: <747f1dec.0204140251.54ee7eb0_at_posting.google.com>
Hello, imagine I have lots of tables each containing 30-75,000
entries.
The query
SELECT * FROM tablename WHERE something=somethingelse
returns on occasions many thousand hits.
What sort of SQL construct do you use to say give me the first 5
entries.
Again thank you in advance to everyone that thinks about, or posts,
solutions to this query.
Then what SQL do you use to get the next 5 entries.
Then the SQL to get the 5 after that etc, for a table in a general
sense. I don't care about the 'order' of the results that come back, I
just want to display things in bite size chunks (like a hitset, and if
the user doesn't find the result they're after in the client
front-end, they hit the "next" button).
Barry
Received on Sun Apr 14 2002 - 12:51:23 CEST