显式内连接和隐式连接之间的区别 [英] difference between explicit inner join and implicit

查看:2424
本文介绍了显式内连接和隐式连接之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

显式内连接和隐式内容之间是否存在差异

内连接


显式内连接示例:


SELECT *

来自员工

INNER JOIN部门

ON employee.DepartmentID = department.DepartmentID

隐式内部联接的示例:


SELECT *

来自员工,部门

WHERE employee.DepartmentID = department.DepartmentID

解决方案

3月31日下午1点02分,YZXIA< yz ... @ hotmail.comwrote:


显式内连接和隐式之间有什么区别

内连接



执行这两个查询的计划都是一样的,所以我建议他们功能相同。



* explicit inn之间有什么区别吗?呃加入和隐含

内连接



技术上没有,但是把它作为习惯使用
显式内连接。它被认为是现在的标准,更容易阅读和调试,并且与OUTER JOIN

语法一致。


- CELKO--写道:


真正的区别在于程序员的心态。那些

用线性序列

连接写入带有加密符号的东西,好像它们仅限于简单的二进制Theta运算符。使用旧标记的

程序员将使用BETWEEN,IN()和

其他使用多个术语的谓词。



喜欢这个,你的意思是?你推荐还是弃用它?


选择ax,来自table1的

a

加入table2 b on ax by by和500


Is there any difference between explicit inner join and implicit
inner join

Example of an explicit inner join:

SELECT *
FROM employee
INNER JOIN department
ON employee.DepartmentID = department.DepartmentID

Example of an implicit inner join:

SELECT *
FROM employee, department
WHERE employee.DepartmentID = department.DepartmentID

解决方案

On Mar 31, 1:02 pm, YZXIA <yz...@hotmail.comwrote:

Is there any difference between explicit inner join and implicit
inner join

The execution plan for both queries is the same, so that suggests to
me that they are functionally identical.


Is there any difference between *explicit inner join and implicit
inner join

Technically no, but it''s a good idea to make it a habit to use the
explicit inner join. It is considered the standard nowadays, is
easier to read and debug, and is consistent with the OUTER JOIN
syntax.


--CELKO-- wrote:

The real difference is in the mindset of programmers. Those that
write with infixed notation thing in terms of a linear sequence of
joins, as if they were limited to simple binary Theta operators. The
programmers that use the older notation will use BETWEEN, IN () and
other predicates that work with multiple terms.

Like this, you mean? And are you recommending or deprecating it?

select a.x, b.y
from table1 a
join table2 b on a.x between b.y and 500


这篇关于显式内连接和隐式连接之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆