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...

I have 2 packages A and B. Now package A references Package B
and Package B references Package A. How do you compile such
inter-dependent objects in PL/SQL

Answer Posted / anil

I assume this question as:
") I have 2 programs  A and B. Now program A references Program  B and Program B references Program A. How do you compile such inter-dependent objects in PL/SQL"

ANS:We can compile mutually referencing programmes using FORWARD declaration(specifying the declaration of one program in beginning of package body) inside a PACKAGE.
Example:
CREATE OR REPLACE PACKAGE test_pack
IS
gvar NUMBER:=0;
--PROCEDURE p1; --we can also achieve like this
END;
/

CREATE OR REPLACE PACKAGE BODY test_pack
IS
PROCEDURE p1; --forward declaration

PROCEDURE p2 
IS
BEGIN
P1;
END;

PROCEDURE p1
IS
BEGIN
p2;
END;

END;

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are tuples in sql?

1113


Where can I learn sql for free?

977


Define the select into statement.

1033


How to move files from one directory to another in pl sql?

1171


Mention what does plvtab enables you to do when you showthe contents of pl/sql tables?

1144


What is sql constant?

1008


What is set transaction?

1018


What do you mean by rowid?

952


What are commit, rollback, and savepoint?

966


What is multiple columns?

1045


How to use transactions efficiently : transact sql

1030


what are numeric data types? : Sql dba

1046


Do we need to rebuild index after truncate?

1011


What does seeding a database mean?

933


Inline the values in PL/SQL, what does it mean.?

1201