Development Experience

Thursday, July 31, 2014

IF Sum is null convert it to 0 (zero)


Oracle you may use the query below to convert SUM of totalPrice to zero when SUM result is null by using COALESCE 


select  COALESCE(SUM(totalPrice),0) "Total"  from productPriceTable

No comments:

Post a Comment