哪个表是“左"表?表格和“正确"一个JOIN语句(SQL)中的表? [英] Which table exactly is the "left" table and "right" table in a JOIN statement (SQL)?

查看:187
本文介绍了哪个表是“左"表?表格和“正确"一个JOIN语句(SQL)中的表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是什么使给定的表成为左表?

What makes a given table the left table?

表是否在查询的发件人"部分中显示?

Is it that the table is indicated in the "From" part of the query?

还是因为它位于=运算符的左侧,所以它是左侧的表格吗?

Or, is it the left table because it is on the left hand side of the = operator?

以下等价物

SELECT *
FROM left_table
LEFT JOIN right_table ON left_table.right_id = right_table.id

SELECT *
FROM left_table
LEFT JOIN right_table on right_table.left_id = left_table.id

???

谢谢

推荐答案

Left表是select中的第一个表.是的,您的两个示例是等效的.

The Left table is the first table in the select. Yes, your two examples are equivalent.

这篇关于哪个表是“左"表?表格和“正确"一个JOIN语句(SQL)中的表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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