1.

How To Call A Stored Function With Parameters?

Answer»

You can define a FUNCTION that takes parameters, provide values to those parameters when calling the function. Here is a GOOD example of a function with a parameter:

SQL> CREATE OR REPLACE FUNCTION GET_DOUBLE(X NUMBER) RETURN NUMBER AS BEGIN RETURN X * 2; END; /

Function created. SQL> SELECT GET_DOUBLE(36) FROM DUAL;

GET_DOUBLE(36)
--------------
72

You can define a function that takes parameters, provide values to those parameters when calling the function. Here is a good example of a function with a parameter:

Function created. SQL> SELECT GET_DOUBLE(36) FROM DUAL;

GET_DOUBLE(36)
--------------
72



Discussion

No Comment Found