Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Select max

Re: Select max

From: Mirlok <tima_at_azercell.com>
Date: Mon, 22 Jul 2002 17:14:14 +0500
Message-ID: <ahgt40$1t2m$1@serv2.vsi.ru>


select * from foo where bfield =
(select max(bfield) from foo)

"Leonardo Lombardo" <leo.lombardo_at_inwind.it> wrote in message news:92a335d0e9cd9712defc44fee77a039c.69477_at_mygate.mailgate.org...
> Hi all,
>
> my question/problem is:
>
> I want to select a row from a table where one of its field has the
> maximum value in that table. For example:
>
> Table FOO
> id number
> afield varchar2
> bfield date
>
> How can I write an sql statement that selects the whole row in which
> bfield is max ?
>
> Thanks in advance, Leonardo
>
>
> --
> Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Received on Mon Jul 22 2002 - 07:14:14 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US