Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Please help - dependancies

Re: Please help - dependancies

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Tue, 13 Feb 2001 17:24:07 +0100
Message-ID: <96bn38$juv$1@s1.read.news.oleane.net>

Answer embedded.

--
Have a nice day
Michel


"Arthur" <mechhunter_at_rocketmail.com> a écrit dans le message news:
3a895389.33504746_at_news.iinet.net.au...

> Hi,
>
> Sorry for posting this twice, my previous post, I don't think I was
> obvious that I needed some help from the readers of this newsgroup.
> *smile*.
>
> I am going to sit for my exam soon and I am hoping someone would be
> able to help me with some of the questions I have from reading the
> text book, it's dealing with dependacies, Object.
>
> There's a procedure called Query_emp that dependant on a public
> synonym called EMP. Suppose later on, a table is created called EMP.
>
> a) Will this change invalid the procedure Query_emp ?
Yes, but it will be validated at the first call because of the automatic recompilation.
> b) Which of the two EMP object will the procedure refernce ?
The new table. See exemple below: v734> create table t (col number); Table created. v734> insert into t values (0); 1 row created. v734> create public synonym s for t; Synonym created. v734> select count(*) from s; COUNT(*) ---------- 1 1 row selected. v734> create or replace function query_s return number 2 is 3 nb number; 4 begin 5 select count(*) into nb from s; 6 return nb; 7 end; 8 / Function created. v734> select query_s from dual; QUERY_S ---------- 1 1 row selected. v734> select status from user_objects where object_name='QUERY_S'; STATUS ------- VALID 1 row selected. v734> create table s (col number); Table created. v734> select status from user_objects where object_name='QUERY_S'; STATUS ------- INVALID 1 row selected. v734> select query_s from dual; QUERY_S ---------- 0 1 row selected. v734> select status from user_objects where object_name='QUERY_S'; STATUS ------- VALID 1 row selected.
>
> All help will be greatly appriciated.
>
> Arthur
Received on Tue Feb 13 2001 - 10:24:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US