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 Write Date and Time Interval Literals in Oracle? |
☺ | What Happens to Indexes If You Drop a Table? |
☺ | How To Use Values from Other Tables in UPDATE Statements using Oracle? |
☺ | What Is the Relation of a User Account and a Schema? |
☺ | How To Connect the Oracle Server as SYSDBA? |
Top DB Oracle Categories
☺ | Oracle PL-SQL Interview Questions. |
☺ | Oracle DBA Interview Questions. |
☺ | Oracle D2K Interview Questions. |
☺ | OCI Interview Questions. |
☺ | Forms Reports Interview Questions. |