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 -> REPOST: Re: Test for a table

REPOST: Re: Test for a table

From: TurkBear <jgreco1_at_mn.rr.com>
Date: Fri, 25 Jan 2002 12:14:12 -0600
Message-ID: <3$--$%%%_$_%-$_$_$@news.noc.cabal.int>


If the table is large that could take a long time; Try:

select 'x' from table_name where 1=1 and rownum < 2;

If it does exist, x will be returned..
If the table does not exist, an error will result ( an ORA 942)... ( same as would happen in the other response)

"Mark & Kristi Wagoner" <mwagoner_at_iac.net> wrote:

>select count(*) from all_tables (or user_tables) where table_name='XXX';
>
>"Philip Morrow" <cracker_at_mymorrow.com> wrote in message
>news:gn028.364520$oj3.71133325_at_typhoon.tampabay.rr.com...
>> How can I test for the existance of a table using a SQL statement.
>>
>> Thanks
>> Phil
>>
>>
>

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World!  Check out our new Unlimited Server. No Download or Time Limits! -----== Over 80,000 Newsgroups - 19 Different Servers! ==-----

This message was cancelled from within The Unacanceller's glorious new software, Lotus 1-2-3 For Rogue Cancellers. Received on Fri Jan 25 2002 - 12:14:12 CST

Original text of this message

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