Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> max values
hi all,
i like to ask about the following.
SQL> select * from temp;
CODE NAME ADDRESS ---------- ---------- --------- 12 jane abc 15 peter qwe 10 pat poi 9 leo lkj 8 eve dfg
when i do a <select max(code) from temp;>, the result is
MAX(CODE)
instead of 15. what is the correct syntax in order to have 15 to be the expected result.
secondly, with the max values got from code, i would want to have the name's result as well which should be peter. what is the syntax? when i do this <select name, code from temp where name = max(name);>, error is ORA-00934: group function is not allowed here. any idea?
could it because oracle 7.2 do not allow such function?
pls help..
thanks in advance!
evelyn.
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Jan 08 1999 - 22:15:42 CST
![]() |
![]() |