我有三個名爲「Guest」,「Guest_Address」和「Acutal_Address」的表。 Guest_Address是guest和acutal_address之間的鏈接表。 這是我到目前爲止。三種方式加入sql
SELECT GUEST_ADDRESS.ADDRESS_CODE,(GUEST_FNAME+' '+GUEST_LNAME) AS GUEST_NAMES
FROM GUEST JOIN GUEST_ADDRESS
ON GUEST.ADDRESS_NUM = GUEST_ADDRESS.ADDRESS_NUM;
這隻會加入Guest和Guest_address表,但我需要加入Guest和Acutal_Address。 這是ERD。