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

Home -> Community -> Usenet -> c.d.o.server -> Re: Testing a table existence

Re: Testing a table existence

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Tue, 11 Dec 2001 11:41:19 -0000
Message-ID: <3c15f12a$0$234$ed9e5944@reading.news.pipex.net>


However you need dba privs to query this view and would want to specify the owner of the table.

--
Niall Litchfield
Oracle DBA
Audit Commission UK
*****************************************
Please include version and platform
and SQL where applicable
It makes life easier and increases the
likelihood of a good answer

******************************************
"Peter Lintner" <peter.lintner_at_sos-kd.org> wrote in message
news:IP4R7.28$zy5.898_at_psinet-eu-nl...

> Hi Sylvain!
> Following works:
> myVariable:=0;
> select count(*) into myVariable from dba_tables where
table_name='MYTABLE';
> if myVariable>0 then
> ...
> end if;
>
> I prefer dba_tables, because so the table owner can be any user!
>
> HTH
> Peter
>
>
>
Received on Tue Dec 11 2001 - 05:41:19 CST

Original text of this message

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