Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Sub-query in order by clause
Yes, I see that. (hangs head in shame)
> -----Original Message-----
> From: Nicoll, Iain [mailto:IAIN.D.NICOLL_at_saic.com]
>
> As I believe has been pointed out already it may possibly be
> more efficient
> if dept is very small and emp is very large (especially if
> there are filters
> and a join would be done before a filter was applied).
> Alternatively it may
> be that Oracle believe it is more intuitive to people with no
> preconceived
> ideas.
>
> -----Original Message-----
> Sent: 04 April 2003 20:24
>
> Why would you do that instead of
> SELECT emp.deptno, empno, ename
> FROM emp a, dept b
> WHERE dept.deptno = emp.deptno
> order by dept.deptname ;
>
> > -----Original Message-----
> > From: Nicoll, Iain [ mailto:IAIN.D.NICOLL_at_saic.com
> <mailto:IAIN.D.NICOLL_at_saic.com> ]
> >
> > Don't really know but couldn't it be useful if you had
> >
> > ORDER BY ( SELECT deptname FROM dept
> > WHERE dept.deptno = emp.deptno)
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Jacques Kilchoer INET: Jacques.Kilchoer_at_quest.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Fri Apr 04 2003 - 16:38:42 CST