I have an oracle Procedure and I want to set the default parameter to the result of a select statement such as below.
procedure foo( startID number : = max(x.id) from xtable x )
but the code above is illegal syntax.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use an otherwise unvalid value for this meaning, for example NULL:
If your function/procedure is in a package, you could also overload it: