Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help about Table selection, please
wajim wrote:
> Hi all, I have here a query to sort name, job function and department,
> the query is working but I don't know how to restrict the selection, I
> mean instead of sorting
> all departments and functions, I onli need to sort employees who are
> managers in the 'SALES'
> an 'RESEARCH' departments.
>
> Here is my query...
>
> select e.first_name||' '||e.last_name "full_name",
> j.function "job_function", d.name "department"
> from employee e, job j, department d
> where e.department_id=d.department_id
> and e.job_id=j.job_id;
>
>
> Thanks in advance
UNION ALL a sorting query to a non-sorting query.
And in the end you will likely gain nothing measurable: Sort it all unless an explain plan demonstrates otherwise.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Thu Aug 09 2007 - 10:19:47 CDT