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
What is Tax Categories?
What view would you use to determine free space in a tablespace?
Explain the use of table functions.
What is auto invoicing? Explain : oracle accounts receivable
PURCHASE ORDER TO PAYABLES WHAT ENTREIS WILL HAVE
What is autocashrule set? : oracle accounts receivable
What are different types of transactions in ar? : oracle accounts receivable
What is an Oracle database Full Backup?
what are the types of LIST REPORTS in cognos8BI? and what is the mean and use of METRIC STUDIO in Cognos 8.3BI?
What is the Difference between the Person_Type_id column in the per_all_people_f and per_person_type_usages_f
Explain the difference between $ORACLE_HOME and $ORACLE_BASE.
Are These Dff's Flexible?
How to move the data from one flatfile to multiple staging tables?give me some examples? for example in po interface one flat file is there and multiple staging tables are there how can move it?please give me answer for this question?
Tell me about entire study of finacle software as soon as possible? give me the idea about questions which coulb be asked in interview of pnb it officers?
What is auto accounting what are the steps for setting up auto accounting? : oracle accounts receivable