sql select question



Hi all
this is more of an SQL question than a Java question.
I have a table with a SPEED column and some other columns like this:

SPEED SOME_OTHER_COLUMNS....
----- ------------------
100 some values here...
34
97
68
13
27
44


now I want to select the two rows that surround a value I am interested in. For example, if I am interested in a value of 55, I want to select the two rows that have a speed of 44 and 68.
Is there a way of doing that in SQL ?
i can handle the case where i get an exact match separately.
I just need to know how to select exactly two rows (the one above the given value and the one below it).


Thanks for any help.
.



Relevant Pages

  • Re: sql select question
    ... hilz wrote: ... this is more of an SQL question than a Java question. ... I have a table with a SPEED column and some other columns like this: ...
    (comp.lang.java.databases)
  • Re: sql select question
    ... this is more of an SQL question than a Java question. ... I have a table with a SPEED column and some other columns like this: ... Is there a way of doing that in SQL? ...
    (comp.lang.java.databases)