Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is mrc and what is its use? : oracle accounts receivable

1096


Differentiate between earned discounts and unearned discounts? : oracle accounts receivable

1096


i want to know about the javaBean.what is its purpose and how it can use in Forms.

2405


hi iam kavya, i completed Oracle11i(finance module), i do not know how to face the interview questions please adivese me

2176


Explain about party and customer in ar : oracle accounts receivable

1140


What is an Oracle database Partial Backup?

1107


Which is the best institute in Hyderabad to learn OBIEE and DataStage?Please tell me faculty name also

2215


What is auto invoicing? : oracle accounts receivable

1084


please send me oracle pl/sql exp resume. and also faqs...

2443


key flexfield structure

2111


How would you go about increasing the buffer cache hit ratio?

2535


What is auto invoicing? Explain : oracle accounts receivable

1052


Difference between negative and positive adjustments : oracle accounts receivable

1009


how to write customizations in po

1558


what are all the conversion and interfaces in GL,AP,AR,HRMS with example? otherwise send send link for these

2272