mysql 数据判定返回值是否null的function函数
CREATE FUNCTION .ifnull_thendash (param VARCHAR(50))RETURNS VARCHAR(50)BEGIN SET @dash = '-' ; SET @temp = NULL ; SET @result = param ; WHILE @null = param DO SET @result = @dash ; END WHILE ; RETURN @result ;END ;