Explain the difference between a FUNCTION, PROCEDURE and
PACKAGE.
Answer Posted / aleena
PROCEDURE:
cannot return a value
SYNTAX:
CREATE PROCEDURE procedure_name [argument datatype]
AS
BEGIN
sql statements
END;
/
FUNCTION:
returns a value
SYNTAX:
CREATE FUNCTION function_name [argument[IN] datatype]
RETURN datatype
AS
BEGIN
sql statements
END;
/
PACKAGES
Pakages are groups of functions,procedures,sql blocks
goruped together in a single unit.
there are two parts to creating a PACKAGE --1>CREATE
PACKAGE & 2> CREATE PACKAGE BODY
SYNTAX :
CREATE PACKAGE :
CREATE PACKAGE package_name
AS
FUNCTION function_name(datatype);
PROCEDURE procedure_name (datatype);
.......
.......(sql/plsql statements )
........
END;
CREATE PACKAGE BODY :
CREATE PACKAGE BODY packagebody_name
AS
FUNCTION function_name (datatype)
RETURN datatype
AS
.....
.....
.....
END function_name;
PROCEDURE procedure_name (datatype)
AS
......
.....
.....
END procedure_name
END PACKAGE;
Is This Answer Correct ? | 46 Yes | 5 No |
Post New Answer View All Answers
i want to know about the javaBean.what is its purpose and how it can use in Forms.
HOW TO SPOT AHIERARCHY?
PURCHASE ORDER TO PAYABLES WHAT ENTREIS WILL HAVE
Explain the use of table functions.
can we use lexical perameter in oracle plsql if yes how
Explain accounting for invoice in advance and arrears. : oracle accounts receivable
What is the Difference between the Person_Type_id column in the per_all_people_f and per_person_type_usages_f
Hey i want to join oracle apps so will you pls tell me that which institute is best in hyderabad.
What Are Cross Validation & Adi?
1.In a table Gender is a column in that male and female are the two data.In a single statement i have to modify all male to female and all female to male vice versa. 2.In a single query i need the count of male data,count of female and total count
can u pls share responsibilities for production how to environment in odi?and how to generate report ?
Difference between negative and positive adjustments : oracle accounts receivable
as a technical developer in oracle applications which type errors feced in your experience sofar
Explain how to close periods in ar. : oracle accounts receivable
What is db_recovery_file_dest in oracle? When do you need to set this value?