A function can be executed in the following ways.
1) Since a function returns a value we can assign it to a variable.
employee_name := employer_details_func;
If ‘employee_name’ is of datatype varchar we can store the name of the employee by assigning the return type of the function to it.
2) As a part of a SELECT statementSELECT employer_details_func FROM dual;
3) In a PL/SQL Statements like,dbms_output.put_line(employer_details_func);
This line displays the value returned by the function
No comments:
Post a Comment