Hello all,
I can't seem to figure out a working SQL for the following condition,
and I'm not sure if it's possible in SQL at all (but hope it is).
Let's say I have a simple schema:
CREATE TABLE MyTable ( ID INTEGER PRIMARY KEY, SomeData )
What I'd like to get is 5 records (for example) that are immediately
before a given ID (where before means their ID is less than).
For example, with the sample data:
1, a
2, b
3, c
4, d
5, e
6, f
7, g
8, h
and the ID = 8, I'd like to get:
h, g, f, e, d
I'd appreciate any help on this!
Thank you in advance,
Dennis
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------