在SQL中理解JOIN的好方法或教程 [英] Good methods or tutorials for understanding JOINs in SQL

查看:102
本文介绍了在SQL中理解JOIN的好方法或教程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因为我们知道在任何RDBMS中有不同类型的JOIN,例如: - 左连接,外连接,内连接,左外连接等。不可避免地,我们对我们的项目中的许多业务逻辑使用JOIN。然而,很少有人完全理解或掌握这些JOIN。通常,具有关于JOIN的半知识知识的人往往会与复杂的查询混淆。我感兴趣的领域将主要与SQL Server相关,因为我们在几乎所有的项目中使用它。

As we know that there are different types of JOINs in any RDBMS, for eg:- Left join, outer join, inner join, left outer join etc. Invariably we use JOINs for lots of our business logics in our projects. However very few people have complete understanding or mastery over these JOINs. Usually people with half known knowledge on JOINs tend to get confused with complex queries. My area of interest would be mostly related to SQL Server since we are using that in almost all our projects.

我已经经历了一些关于JOIN的好文章,但大多数倾向于混淆而不是说服。所以我想知道是否有任何良好的方法/方法或任何好的教程,以便在SQL中的JOINS得到一个很好的把握。教程应该足够简单,以及帮助我​​们的基础对JOINs更强。

I have gone through some nice articles on JOINs but most of them tend to confuse rather than convince. So I wanted to know if there are any good ways/methods or any good tutorials for getting a good grasp on JOINs in SQL. Tutorials should be simple enough as well as help in getting our basics on JOINs stronger.

提前感谢。

推荐答案

http://www.codinghorror.com/blog/2007/10/a-visual-explanation-of-sql-joins.html>这个链接可视化显示维恩图中的不同连接非常简洁。

I find this link visually displaying the different joins in Venn diagrams is pretty succinct.


...左连接,外连接,内连接,左外连接...

...Left join, outer join, inner join, left outer join...

LEFT JOIN和LEFT OUTER JOIN是相同的;大多数数据库只允许你省略OUTER关键字。

LEFT JOIN and LEFT OUTER JOIN are the same; most databases just allow you to omit the OUTER keyword.

这篇关于在SQL中理解JOIN的好方法或教程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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