What Is an Oracle Function?
Submitted by: AdministratorA function is a named program unit. It consists of three parts:
► Declaration Part - Defining the function name, calling parameters, return value type, local variables and local procedures. Declaration part is required.
► Execution Part - Defining execution logic with executable statements. Execution part is required.
► Exception Part - Defining error handling logic. Exception part is optional.
Here how a complete procedure should look like:
FUNCTION name (parameter_1, parameter_2) RETURN type AS
-- Declaration statements
BEGIN
-- Executable statements
RETURN value;
EXCEPTION
-- Error handling statements
END;
Submitted by: Administrator
► Declaration Part - Defining the function name, calling parameters, return value type, local variables and local procedures. Declaration part is required.
► Execution Part - Defining execution logic with executable statements. Execution part is required.
► Exception Part - Defining error handling logic. Exception part is optional.
Here how a complete procedure should look like:
FUNCTION name (parameter_1, parameter_2) RETURN type AS
-- Declaration statements
BEGIN
-- Executable statements
RETURN value;
EXCEPTION
-- Error handling statements
END;
Submitted by: Administrator
Read Online Oracle Database Job Interview Questions And Answers
Top Oracle Database Questions
☺ | How Oracle Handles Dead Locks? |
☺ | What Is the Relation of a User Account and a Schema? |
☺ | What Is Input Buffer in SQL*Plus? |
☺ | What Happens to Indexes If You Drop a Table? |
☺ | What Is an Oracle User Account? |
Top DB Oracle Categories
☺ | Oracle PL-SQL Interview Questions. |
☺ | Oracle DBA Interview Questions. |
☺ | Oracle D2K Interview Questions. |
☺ | OCI Interview Questions. |
☺ | Oracle RMAN Interview Questions. |