我有两张表EMPLOYEE
和DEPARTMENT
。
DEPARTMENT
表的列:
DEPARTMENT_ID
DEPARTMENT_NAME
MANAGER_ID
LOCATION_ID
EMPLOYEE
表
EMPLOYEE_ID
FIRST_NAME
LAST_NAME
EMAIL
PHONE_NUMBER
HIRE_DATE DATE
JOB_ID
SALARY
COMMISSION_PCT
MANAGER_ID
DEPARTMENT_ID
如果显示所需的号码DEPARTMENT_ID
,请选择EMPLOYEE_ID
FIRST_NAME
LAST_NAME
EMAIL
PHONE_NUMBER
HIRE_DATE DATE
JOB_ID
SALARY
COMMISSION_PCT
MANAGER_ID
DEPARTMENT_ID
答案 0 :(得分:1)
请执行此查询
select
emp.first_name, emp.last_name, emp.email, emp.phone_number,
dept.manager_id
from
employee emp, department dept
where
emp.department_id = dept.department_id