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 -> Return rowid with max()

Return rowid with max()

From: music4 <music4_at_163.net>
Date: Mon, 4 Aug 2003 11:56:59 +0800
Message-ID: <bgklkh$qnb@netnews.proxy.lucent.com>


Greetings,

Say I have a table with two columns: name, score. I want to get name of the highest score. I wrote following SQL statement:

select name from tbl where score = (
  select max(score) from tbl)

The statement includes two select, is there a way to use only one select to get the name of highest score's name?

Thanks in advance!
Evan Received on Sun Aug 03 2003 - 22:56:59 CDT

Original text of this message

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