How To Call a Stored Function in Oracle?
Submitted by: AdministratorA 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.
Submitted by: Administrator
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.
Submitted by: Administrator
Read Online Oracle Database Job Interview Questions And Answers
Top Oracle Database Questions
☺ | How To Use Values from Other Tables in UPDATE Statements using Oracle? |
☺ | How To Shutdown Your 10g XE Server? |
☺ | What Happens to Indexes If You Drop a Table? |
☺ | How To Recover a Dropped Table in Oracle? |
☺ | What Is Input Buffer in SQL*Plus? |
Top DB Oracle Categories
☺ | Oracle PL-SQL Interview Questions. |
☺ | Oracle DBA Interview Questions. |
☺ | Oracle D2K Interview Questions. |
☺ | OCI Interview Questions. |
☺ | Oracle RMAN Interview Questions. |