开发者

create a query that will display employee name and department number [closed]

开发者 https://www.devze.com 2023-04-12 04:58 出处:网络
Closed. This question needs to be开发者_开发百科 more focused. It is not currently accepting answers.
Closed. This question needs to be开发者_开发百科 more focused. It is not currently accepting answers.

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 question

hey 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;
0

精彩评论

暂无评论...
验证码 换一张
取 消