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

Home -> Community -> Usenet -> c.d.o.misc -> Re: ALL_TABLES is different in PL/SQL ?

Re: ALL_TABLES is different in PL/SQL ?

From: <mpir_at_compuserve.com>
Date: Wed, 17 Jun 1998 13:46:00 GMT
Message-ID: <6m8hao$9cu$1@nnrp1.dejanews.com>


All_Tables is a view of the tables to which the user has access. It is actually a view of a view of....

When you run a packaged procedure it does not have access to the SYS.xxxx or SYSTEM.xxxx tables unless it is run as SYS or SYSTEM and/or the specific user running the package has specific access to the table (as a user not thru a role.)

In article <01bd9957$bc9619c0$0100007f_at_w95luca>,   "Luca Minudel" <luca.minudel_at_nline.it> wrote:
>
> When I execute this SQL:
>
> SELECT ROWNUM, OWNER, TABLE_NAME
> FROM ALL_TABLES;
>
> from SYSTEM user I get 83 rows.
>
> When I execute the same selection from PL/SQL:
>
> create or replace procedure testproc as
> cursor curtables is
> select owner, table_name, rownum
> from all_tables;
> begin
> for curtablesrec in curtables loop
> dbms_output.put_line(curtablesrec.rownum|| ' - ' ||=20
> curtablesrec.owner || ' - ' ||=20
> curtablesrec.table_name);
> end loop;
> end;
> .
> .
> .
> SET OUTPUTSERVER ON;
> EXECUTE testproc;
>
> I just get 18 rows. WHY???
>
> ___________________________________________________
> Luca Minudel software designer
> Italy Conegliano (TV)
> voice & fax +39 (0)438 412280
> e-mail luca.minudel_at_nline.it
> WWW (italian language used)
> http://www.geocities.com/SiliconValley/Vista/4041
>
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Wed Jun 17 1998 - 08:46:00 CDT

Original text of this message

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