MySQL Forums
Forum List  »  Oracle

Re: Another ROWNUM problem
Posted by: Roland Bouman
Date: August 16, 2005 02:19AM

select *
from users2 u
where u.id =(
select max(id)
from users2 umax
where umax.id < s.id
)
union all
select
from users2 u
where u.id = s.id
union all
select *
from users2 u
where u.id =(
select min(id)
from users2 umin
where umax.id > s.id
)

Options: ReplyQuote


Subject
Views
Written By
Posted
9157
April 18, 2005 05:53AM
3459
August 12, 2005 06:07PM
Re: Another ROWNUM problem
3177
August 16, 2005 02:19AM
3136
October 06, 2005 08:35AM
3187
December 01, 2005 08:08AM


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.