Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: using MAX function...
Rookie schrieb:
> I have a table that has user_id, first_name, and last_name.
>
> How do I write a view that lets me see all three fields with the
> max(user_id)?
Use one of the following statements:
select
p.user_id, p.last_name, p.first_name
from PERSON );
select
p.user_id, p.last_name, p.first_name
You have to use an index on user_id, but I think you are already use it....
Regard, Stephan
--
Dipl.-Inf. (FH) Stephan Born | beusen Consulting GmbH fon: +49 30 549932-0 | Landsberger Allee 392 fax: +49 30 549932-21 | 12681 Berlin mailto:stephan.born_at_beusen.de | Germany --------------------------------------------------------------- PGP-Key verfügbar | PGP-Key available ---------------------------------------------------------------Received on Thu Mar 16 2000 - 02:39:01 CST