如何使用左连接语句

如何使用左连接语句

本文介绍了当某个列不在第一个表中时,如何使用左连接语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试将所有表组合成一个带左连接的大表。但是,因为我的配置文件表在表中没有cemetery_ID,所以join语句不会绑定。但是,我需要cemetery_ID加入cemetery_reference表。



这就是我所拥有的:



I have been trying to combine all tables into a large table with a left join. However, because my profile table does not have a cemetery_ID in the table the join statement will not bind. however, I need the cemetery_ID to join the cemetery_reference table.

here is what I have:

"Select * From profile Left join cemeteries on Profile.ID = cemeteries.Individual_ID left join Cemetery_reference on Cemetery.Cemetery_ID = Cemetery_reference.Cemetery_ID"





我尝试了什么:



尝试使用括号分隔连接,但这不起作用。



What I have tried:

Tried to separate the joins by using parenthesis but this not work.

推荐答案


这篇关于当某个列不在第一个表中时,如何使用左连接语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 19:54