我有工作人员,部门,位置表。
我想从这3张表中显示员工姓名,部门名称,城市名称。 有人可以帮助我,我是oracle的新手。
答案 0 :(得分:1)
简单示例:
select
s.person_name,
d.department_name,
l.city_name
from staff s
JOIN department d
ON s.something = d.something
JOIN location l
ON l.something = d.something
答案 1 :(得分:1)
SELECT s.first_name, d.department_name, l.city
FROM staff s, department d, locations l
WHERE s.depart_id = d.depart_id
AND d.location_id = l.location_id;