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: <rob_raymond_at_hotmail.com>
Date: Wed, 17 Jun 1998 07:11:26 GMT
Message-ID: <6m7q6t$9en$1@nnrp1.dejanews.com>


Luca,

ALL_TABLES is a view. Its to do with the where clause on the view. I saw this behaviour when executing PL/SQL from OO4O or PowerBuilder (ie through the OCI), not directly in SQL*Plus. When I had this problem with it, I changed ALL_TABLES to DBA_TABLES, which fitted my requirements.

HTH Rob

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 - 02:11:26 CDT

Original text of this message

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