MySQL 加入了吗?这些是什么?何时使用它们?

发布于 2024-09-14 01:17:43 字数 232 浏览 2 评论 0原文

我可能会因此而被宰,并被告知要阅读手册(我有,但它对我的理解没有帮助)。

我现在越来越多地使用MySQL,但我无法理解连接,我知道连接有多种类型,即内部连接、外部连接、左连接、右连接,但我不知道它们之间有什么区别,也不知道它们之间有什么区别。使用其中一种相对于另一种的优点是。

我发现自己越来越多地使用左连接,因为我知道语法,但是我现在担心这可能会让我的应用程序在速度方面处于劣势,也许我应该根据我的需求使用其他连接?

I am probably going to get slaughtered for this, and told to read the manual (which I have, but it has not helped my understanding).

I working with MySQL more and more at the moment, but I cannot get my head around joins, I know there are multiple types of join, i.e Inner, Outer, Left, Right but I do not what the differences are between them or what the adavantages of using one over the other is.

I find myself more and more just using left joins as I know the syntax, however I am now worried that maybe this good put my applications at a disadvantage in terms of speed and maybe I should be using other joins depending on what my needs are?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

¢蛋碎的人ぎ生 2024-09-21 01:17:43

我真的很喜欢这个解释:
http://www.codeproject.com/KB/database/Visual_SQL_Joins.aspx 它显示了各种 JOIN,并且有一个很好的概述。制作一份硬拷贝并将其粘在门上。

在此处输入图像描述

I really like this explanation:
http://www.codeproject.com/KB/database/Visual_SQL_Joins.aspx It shows all kinds of JOIN's and has a nice overview. Make a hardcopy and glue it on your door.

enter image description here

染火枫林 2024-09-21 01:17:43

我喜欢这个帖子!

http://www.codinghorror。 com/blog/2007/10/a-visual-explanation-of-sql-joins.html

它的视觉解释(通过图表)使其非常清晰。

I love this post !!!

http://www.codinghorror.com/blog/2007/10/a-visual-explanation-of-sql-joins.html

its a visual explanation (by diagrams) make it pretty clear.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文