Title: RE: Sub-query in order by clause

I see your point. The answer to my question "why would you do that instead of ... " is, of course, "because the other way might be faster."

Read Jonathan Lewis' earlier post, he had (as always) some good insight.

> -----Original Message-----
> From: Lyndon Tiu [mailto:[EMAIL PROTECTED]]
>
> Which way is faster? The subselect(nested select) or the join?
>
> Quoting Jacques Kilchoer <[EMAIL PROTECTED]>:
>
> > 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:[EMAIL PROTECTED]]
> > >
> > > Don't really know but couldn't it be useful if you had
> > > 
> > > ORDER BY ( SELECT deptname FROM dept
> > >             WHERE dept.deptno = emp.deptno)

Reply via email to