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
Explain the difference between $ORACLE_HOME and $ORACLE_BASE.
What is the importance of batch source set up in ar? : oracle accounts receivable
What do you mean by hz_ in customer tables? : oracle accounts receivable
IS IT POSSIBLE TO CREATE REPORTS FROM DIFFERENT UNIVERSES IN ONE DOCUMENT?
Hi, I want to know basic information about Oracle HRMS and the institutes in hyderabad or the best faculty as i want to make my career in it.And also want to know may a person from non technical background be able to do this course. Regards, Swetha
What do you mean by Oracle MEDIA RECOVERY?
where the dff data will be stored
What is the use of lockboxes? : oracle accounts receivable
what are basic modules required to implement oracle application in any oraganisation?
what are all the conversion and interfaces in GL,AP,AR,HRMS with example? otherwise send send link for these
Explain accounting for invoice in advance and arrears. : oracle accounts receivable
Explain about party and customer in ar : oracle accounts receivable
what are all the conversion and interfaces in GL,AP,AR,HRMS with example? otherwise send send link for these
how to write customizations in po
TILL WHAT LEVEL OF SECURITY BO SUPPORTS?