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 Use “IN” Parameter Properly?

parameter properly
0
Posted

How To Use “IN” Parameter Properly?

0

• A formal IN parameter acts like constant. It can not be assigned with new values. • An actual IN parameter can take a value or a variable. • An actual IN parameter is passed by reference to the specified value or the value of the specified variable. • An actual IN parameter will not receive any value from the formal parameter.Here is good example of a procedure with an IN parameter: SQL> CREATE OR REPLACE PROCEDURE WELCOME AS 2 SITE CHAR(80) := ‘FYICenter.com’; 3 PROCEDURE WELCOME_PRINT(S IN CHAR) AS 4 BEGIN 5 DBMS_OUTPUT.PUT_LINE(’Welcome to ‘ || S); 6 – S := ‘Google.com’; — Not allowed 7 END; 8 BEGIN 9 WELCOME_PRINT(’MySpace.com’); 10 WELCOME_PRINT(SITE); 11 END; 12 / SQL> EXECUTE WELCOME; Welcome to MySpace.com Welcome to FYICenter.com How To Use “OUT” Parameter Properly? Here are the rules about OUT parameters: • A formal OUT parameter acts like an un-initialized variable. It must be assigned with new values before the end of the procedure or function. • An actual OUT parameter m

Related Questions

What is your question?

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

Experts123