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
How to clone the database using RMAN back
what are the tools used for oracle 10g in real time.
Differentiate between standard remittance and bills receivable remittance : oracle accounts receivable
IS IT POSSIBLE TO CREATE REPORTS FROM DIFFERENT UNIVERSES IN ONE DOCUMENT?
1. What is PO rate variance gain and loss?
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?
Explain how to close periods in ar. : oracle accounts receivable
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
how to write customizations in po
3. Steps in UAT?
What do you mean by Oracle MEDIA RECOVERY?
What is the technical flow associated with P2P or Procure to Pay cycle like the tables, APIs, concurrent programs involved in this cycle. Only technical please.
TILL WHAT LEVEL OF SECURITY BO SUPPORTS?
What is chargeback invoice? How do we create it? : oracle accounts receivable
Differentiate between writeoff and receipt writeoff. : oracle accounts receivable