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

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

$
0
0

I have googled this and keep coming up with "No it is not possible" but these posts were dated 2005-2007 so I'm wondering if this has been changed. A code example:

CREATE PROCEDURE `blah`(  myDefaultParam int = 0 -- This breaks the code for some reason)BEGIN  -- Do something hereEND

One of the solutions has been to pass null and then check for null and set the variable. I don't want to do that and I shouldn't have to. If this is true then MySql devs need to wake up because there is so much more I could do with MSSQL.


Viewing all articles
Browse latest Browse all 7

Trending Articles



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