left join query keep a column empty

You can use GROUP BY keyword for grouping them, your query will become something like this

  SELECT pm.receiptID
      , pm.recievedAmount
      , pd.invono
      , pd.paidAmount 
 FROM PaymentMaster pm LEFT JOIN PaymentDetail pd ON pd.receiptID = pm.receiptID GROUP BY pd.receiptID

Browse More Popular Posts

Leave a Comment