Results 1 to 2 of 2

Thread: Employee and Department Query

  1. #1
    Junior Member
    Join Date
    Mar 2008
    Answers
    1

    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


  2. #2
    Expert Member
    Join Date
    Sep 2007
    Answers
    697

    Re: Employee and Department Query

    Quote Originally Posted by sriram.bethe View Post
    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
    select deptno , dname
    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);


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact