Quantcast
Channel: Is it possible to have a default parameter for a mysql stored procedure? - Stack Overflow
Viewing all articles
Browse latest Browse all 7

Answer by SKManX for Is it possible to have a default parameter for a mysql stored procedure?

$
0
0
SET myParam = IFNULL(myParam, 0);

Explanation: IFNULL(expression_1, expression_2)

The IFNULL function returns expression_1 if expression_1 is not NULL; otherwise it returns expression_2. The IFNULL function returns a string or a numeric based on the context where it is used.


Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>