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
i have a column which may contain this kind of value: 123*67_80,12*8889_5,34*8_874 ,12*7_7 (can contain space before a comma, and this string length can be anything) now i want to split this value into two column like: column1: 123*67,12*8889,34*8,12*7 column2: 80,5,874,7 use function for this
Can dml statements be used in pl/sql?
What is the use of partition by in sql?
Explain the uses of a database trigger?
Explain aggregate functions are available there in sql?
What is rank dense_rank and partition in sql?
What are sql indexes?
What is exception? What are the types of exceptions?
What is sql and explain its components?
Define commit, rollback and savepoint?
What is coalesce sql?
What is update query?
Explain the difference between sql and mysql.
how to get help information from the server? : Sql dba
What is left join in postgresql?