Prepare for your Next Interview
This is a discussion on Employee and Department Query within the SQL forums, part of the Databases category; How to retrieve department no that is not having the data in emp table Display all employees who are joined before their manager and they are not managers...
|
|||
|
Employee and Department Query
How to retrieve department no that is not having the data in emp table
Display all employees who are joined before their manager and they are not managers |
| Sponsored Links |
|
|||
|
Re: Employee and Department Query
Quote:
from dept where deptno not in (select deptno from emp); select a.empno,a.ename, a.hiredate from emp a where a.job <> 'manager' and a.hiredate < (select hiredate from emp b where a.mgr = b.empno); |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Show department name and department number only once | orlando | SQL | 6 | 9 Hours Ago 02:00 AM |
| Employee and manager name in single query | Geek_Guest | SQL | 13 | 07-17-2008 12:07 PM |
| employee name and salary from employee and salary table | Himu | SQL | 1 | 07-04-2007 05:34 AM |
| Query employee name who is not in dept no 30 | Geek_Guest | SQL | 1 | 02-22-2007 10:32 AM |
| howmany students are there in a department ? | psuresh1982 | Brainteasers | 3 | 01-03-2007 04:42 AM |