Google News
logo
PL/SQL - Interview Questions
What are actual parameters and formal parameters?
The variables or an expression referred to as parameters that appear in the procedure call statement is known as Actual parameters.
 
For example : raise_sal(emp_num, merit+ amount);
 
Here in the above example, emp_num and amount are the two actual parameters.


The variables that are declared in the procedure header and are referenced in the procedure body are called as Formal parameters.
 
For example :
PROCEDURE raise_sal( emp_id INTEGER) IS
curr_sal REAL:
………..
BEGIN
SELECT sal INTO cur_sal FROM emp WHERE empno = emp_id;
…….
END raise_sal;

 

Here in the above example, emp_id acts as a formal parameter.
Advertisement