Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this questionhey guys im kinda stuck on this question
create a query that will display employee name, dept nmber and all the employees that work in the same department as a given employee
i was thinking this would be the answer:
Select ename,deptno
from emp, dept
but thats not the right answer
select name, dept_number from employees
where dept_num in
(select dept_num from employees where emp_num = given_emp_number);
select employee_name,department,department_id,hire_date
from employees
where department ALL(
select department_id
from employees
where department_id=bruce.exclude.bruce
select
e.last_name "EMP_NAME", d.deptno "DEPT"
from
employees e,
dept d
where
d.deptno=e.department_id;
精彩评论