Cic*_*ici 19 sql oracle join inner-join
我找不到关键词的文档,join但我在网上看到了使用它的例子.
我在Oracle hr模式中做了一些实验,我有表departments:
deparment_namemanager_idlocation_id一张桌子employees:
first_nameemployee_id和表locations:
location_idcity查询应返回department_name,部门经理的first_name以及部门所在的城市.
与使用关键字join相比,使用关键字的代码似乎返回了一些结果inner join
代码join:
select d.department_name, e.first_name,l.city
from departments d
join employees e on d.manager_id=e.employee_id
join locations l on d.location_id=l.location_id
Run Code Online (Sandbox Code Playgroud)
代码inner join:
select d.department_name, e.first_name,l.city
from departments d
inner join employees e on d.manager_id=e.employee_id
inner join locations l on d.location_id=l.location_id
Run Code Online (Sandbox Code Playgroud)
两种情况之间是否存在差异,或者我恰好偶然发现他们返回相同结果的情况?