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
Answers were Sorted based on User's Feedback
Answer / subha
First compile package A and B spec then compile package body of both A and B.
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / ss
i know sql so here A and B are two tables which both having Primary and foreign Key so from A's PK is referring in to B and B's PK referring in to A
OR select * from A inner join B on (A.id=B.AID)
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / 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 |
Which one of the following pairs of aggregate functions do you use with character fields? 1. COUNT(field) and MAX(field) 2. AVG(field) and COUNT(field) 3. MIN(field) and SUM(field) 4. AVG(field) and MAX(field) 5. COUNT(field) and SUM(field)
Can we call a function containing dml statements in a select query?
what is the difference between implicit and explicit trigger
explain the options of myisamchk to improve the performance of a table. : Sql dba
Is it possible to pass parameters to triggers?
What are three advantages to using sql?
Can a varchar be a primary key?
How do I audit the sql sent to the server?
2. Select A.A from ( select 1 as from dual Union select 1 as from dual)A Full outer join ( select 1 B from dual Union select 2 B from dual)B On A.A=B.B
What is sql architecture?
What is graph sql?
Explain uses of cursor.