Answers

Question and Answer:

  Home  Oracle Database

⟩ How To Call a Stored Function in Oracle?

A stored function can be called as part of expression in any PL/SQL statement. One simplest way to call a stored function is to a dummy SELECT statement as shown in the following tutorial script using SQL*Plus:

SQL> CREATE OR REPLACE FUNCTION GET_SITE

2 RETURN VARCHAR2 AS

3 BEGIN

4 RETURN 'globalguidelinee.com';

5 END;

6 /

Function created.

SQL> SELECT get_site() FROM dual;

GET_SITE()

---------------------------------

globalguidelinee.com

DUAL is not a real table or view. It is commonly used to with SELECT statement to evaluate expressions.

 170 views

More Questions for you: