Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
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 | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Show department name and department number only once | orlando | SQL | 7 | 12-05-2008 03:03 PM |
| 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 |