Get the App
SLTechnology News&Howtos  ›  Database  › 

Notes on left join query (LEFT JOIN)

Shulou Source: shulou.com Published: 2022-06-01 18:24:15 10月02日 Update

The left join query condition (ON) should ensure that the condition is unique, otherwise multiple values will be generated

Example:

Select c. Cardholder cc. Cardholder number from `vip_card_ change` as cc left join `vip_ card` as c on cc.card_number=c.card_number and cc.store_key=c.store_key

Instead of:

Select c. Cardholder cc. Cardholder number from `vip_card_ change` as cc left join `vip_ card` as c on cc.card_number=c.card_number

Tags: Conditions queries multiple builds matters considerations Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia macOS Shulou Tech Info OPPO Reno Linux