Oracle outer join syntax

后端 未结 1 486
旧巷少年郎
旧巷少年郎 2020-12-22 09:45

I have a query that looks like this:

select *
from find fsc,
        let lf,
        cust cus,
        STRIKE ist
WHERE   fsc.id = lf.id
AND     ist.ID_old =         


        
相关标签:
1条回答
  • 2020-12-22 10:27

    I believe you want this:

    select *
    from find fsc join
         let lf
         on fsc.id = lf.id join
         STRIKE ist
         on ist.ID_old = fsc.ID_old left join
         cust cus
         on lf.cust_id = cus.cust_id;
    

    To be honest, the outer join is probably not necessary. Why would lf have a cust_id that is not valid? The only reasonable possibility is if the value is NULL.

    0 讨论(0)
提交回复
热议问题