I am writing a stored proc in Snowflake which have a VARCHAR argument, I would like to know how can I have the default value for that argument.
I will call the procedure as :
CALL test (arg1, arg2);
But for arg1 I want to pass default value as 0 (zero) so that if no value is passed, it should accept it as 0(zero).
Couldn't find anything relevant for this, please help.
You can use overloading - create another procedure with same definition but not arguments. Define default value inside procedure body. Your overloaded procedure will be called in case a call is with no arguments.