Re: Kind of BETWEEN
Posted by:
Nick Roper
Date: August 31, 2004 03:16PM
Thomas,
Assuming you are using version 4.0 +, then try something like:
(SELECT num FROM numbers
WHERE num < 1100
ORDER BY num DESC
LIMIT 2)
UNION
(SELECT num FROM numbers
WHERE num > 1100
ORDER BY num ASC
LIMIT 2)
ORDER BY num;
--
Nick Roper
Subject
Written By
Posted
Re: Kind of BETWEEN
August 31, 2004 03:16PM
September 01, 2004 12:09AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.