diffeeent beetween the following on the basic of mentioned parameters
Answers
Answer:
1. Actual Parameters :
The arguments that are passed in a function call are called actual arguments. These arguments are defined in the calling function. These are the variables or expressions referenced in the parameter list of a subprogram call. There is no need to specify datatype in actual parameter.
Example :
// X and Y NUMBER ARE ACTUAL PARAMETERS
SQL> CREATE OR REPLACE FUNCTION FUNC1(X NUMBER,
Y NUMBER)
2 RETURN NUMBER IS
3 R NUMBER;
4 BEGIN
5 R:=X+Y;
6 RETURN(R);
7 END;
8 /
FUNCTION CREATED.
SQL>|
2. Formal Parameters :
These are the variables or expressions referenced in the parameter list of a subprogram specification. The datatype of the receiving value must be defined. The scope of formal arguments is local to the function definition in which they are used.
Example :
SQL> DECLARE
2 N1 NUMBER:=10;
3 N2 NUMBER:=20;
4 S NUMBER;
5 BEGIN
6 S:=FUNC1(N1, N2);
7 DBMS_OUTOUT.PUT_LINE('RESULT IS: '||S);
8 END;
9 /
OUTPUT: RESULT IS: 30
PL/SQL PROCEDURE SUCCESSFULLY COMPLETED.
SQL>|
pls mark me as brainliest
Answer:
1. Actual Parameters :
The arguments that are passed in a function call are called actual arguments. These arguments are defined in the calling function. These are the variables or expressions referenced in the parameter list of a subprogram call. There is no need to specify the datatype in the actual parameter.
2. Formal Parameters :
These are the variables or expressions referenced in the parameter list of a subprogram specification. The datatype of the receiving value must be defined. The scope of formal arguments is local to the function definition in which they are used.