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: Andrew Mobbs <andrewm_at_chiark.greenend.org.uk>
Date: 11 Dec 2001 14:18:24 +0000 (GMT)
Message-ID: <m9x*Svybp@news.chiark.greenend.org.uk>


Niall Litchfield <n-litchfield_at_audit-commission.gov.uk> wrote:
>However you need dba privs to query this view and would want to specify the
>owner of the table.

To be pedantic, you need select_catalog_role privilege, not full DBA.

>"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!

-- 
Andrew Mobbs - http://www.chiark.greenend.org.uk/~andrewm/
Received on Tue Dec 11 2001 - 08:18:24 CST

Original text of this message

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