結果 : function to handle null values in sql