我有三个名为“Guest”、“Guest_Address”和“Acutal_Address”的表。Guest_Address 是 guest 和 acutal_address 之间的链接表。这就是我到目前为止所拥有的。
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。