Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How To Define Default Values for Formal Parameters?

0
Posted

How To Define Default Values for Formal Parameters?

0

If you have an IN parameter, you can make it as an optional parameter for the calling statement by defining the formal parameter with the DEFAULT clause. This gives you the freedom of not providing the actual parameter when calling this procedure or function. See the following tutorial script shows you an example procedure with an optional parameter:SQL> CREATE OR REPLACE PROCEDURE WELCOME AS2 PROCEDURE GREETING(S IN CHAR DEFAULT ‘FYICenter’) AS3 BEGIN4 DBMS_OUTPUT.PUT_LINE(’Welcome to ‘ || S);5 END;6 BEGIN7 GREETING(’MySpace.com’);8 GREETING;9 END;10 /Procedure created.SQL> EXECUTE WELCOME;Welcome to MySpace.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123