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
can u give guidance abt packages of plsql
Hi, IN oracle apps HRMS, if the employee changes his department, and when a conconurrent program is run for calulating the pay, The latest Dept id is not diaplayed, howeber the previous deptid is considered. Please can someone tell me where is the program going wrong, which side?
I need a Technical evaluation between Oracle and SAP ? please do a need ful.
hi iam kavya, i completed Oracle11i(finance module), i do not know how to face the interview questions please adivese me
1)After defining value set we define list of values, I need to enter 1000 values with out entering manually, how will you do that? 2)what are the parameters we use in a concurrent program? 3)what is payroll processing? 4)In organization window after defining an organization and organization classification how to create a new item in the others button? 5)If there are 10 users, How to restrict the selected users not to access the forms?
My requirement is like in database some defects are present and i need to clean them.To be brief for example every employee should have active assigments.So for those records which are not having status as active or null ,i need to update the roecords using API with the correct value. Client will provide a flat file for the records whch are defected.So i need to run the API for those records (flat file)and update the data in database. So my question is how to handle this requirement.Is there any existing API for this purpose?If yes then please send me the NAME. How to update the records in the database using flatfile. Any pointer will be appreciated.Thanks in advance.
HOW TO GET THE ORGANIZATION TO ORGANIZATION DETAILS INFORMATION IN THE INVENTORY MODULE.THE REQUIREMENT IS FROMORG TOORG FROMINV TOINV ..
Are These Dff's Flexible?
What is the difference between oracle media recovery and crash recovery?
what ASIS BUSINESS PROCESS IN ORACLE FINANCE
now iam working as an hr executive in hyderabad i would like to learn oracle hrms kindly suggest me some good institutes in hyderabd
IS IT POSSIBLE TO CREATE REPORTS FROM DIFFERENT UNIVERSES IN ONE DOCUMENT?
I've got a database 10g and Form version 5.0 but unable to connect. Does Oracle 10g database supports form 4.5
what is difference between inner join & nested query or subqueries
What is the use of transaction flexfield in autoinvoice? : oracle accounts receivable