15
我无法在关键词join
上找到文档,但我在网页上看到了使用它的示例。oracle sql中的join关键字和inner join关键字有什么区别?
我在做一些实验,在Oracle hr
模式,在那里我有表departments
:
deparment_name
manager_id
location_id
的表employees
:
first_name
employee_id
而且表locations
:
location_id
city
查询应返回的部门名称,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
代码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
是这两种情况之间存在差异,或者我恰好碰巧遇到了一种情况他们返回相同的结果?
询问并回答:http:// stackoverflow。com/questions/565620 /差异之间的连接和内部连接这不是对你的文章的批评。这是一个迹象,这已被问及之前,并有一个高质量的答案。 – xQbert 2013-04-09 01:38:08
@xQbert:不是关于甲骨文,虽然 – zerkms 2013-04-09 01:38:52
@xQbert:所以?那个答案是基于什么? oracle有义务像sql server一样行事吗?你想引用一个通用的问题 - 找到一个关于ANSI SQL – zerkms 2013-04-09 01:40:04