Connecting Tech Pros Worldwide Forums | Help | Site Map

select next highest salary or last login date ...

Mark
Guest
 
Posts: n/a
#1: Jun 27 '08
good spam subject ;).

anyway, i'm alittle stumped. i'm in need of putting together a query
that gets the next highest salary ( select max ( sal ) - 1?, from an
emp_sal type table. another example is if i have a login_history table,
and i'm logged in, but i want to display the date of my previous login.
if the login_history table has user_id and login_date which makes up
the primary key, how can i get the most recent login (minus the most
recent one?).

the max function comes to mind and use of the rowid/rownum colums, but
is there an easier, more obvious way to do this perhaps?


Closed Thread


Similar Oracle Database bytes