query to ignore duplicate/null records

前端 未结 3 480
夕颜
夕颜 2021-01-26 06:36

Below are the 3 tables which we need to join to get the data

 TableA         TableB               TableC
    AId          BId     Name      CId       DeclareDate         


        
3条回答
  •  暖寄归人
    2021-01-26 06:56

    Try this one

    select a.AID,b.DeclareDate,b.VAL from TABLEA a left outer join (select * from TABLEB where DeclareDate='December') b on a.AID=b.BID order by a.AID asc

提交回复
热议问题