| |
GeekInterview.com > Interview Questions > Oracle > Basics
| Print | |
Question: Create a report for the HR department that displays employee last names, department numbers, and all the employees who work in the same department as a given employee. Give each column an appropriate label.
|
| January 01, 2009 12:44:43 |
#4 |
| justgeek |
Member Since: January 2009 Total Comments: 1 |
RE: Create a report for the HR department that displays employee last names, department numbers, and all the employees who work in the same department as a given employee. Give each column an appropriate label. |
select e.deptno, e.ename, e1.ename from scott.emp e, scott.emp e1 where e.deptno=e1.deptno and e.ename<>e1.ename order by e.deptno,e.ename |
| |
Back To Question | |