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: Test for the exsistance of a table

Re: Test for the exsistance of a table

From: TurkBear <jgreco1_at_mn.rr.com>
Date: Fri, 08 Mar 2002 13:41:45 -0600
Message-ID: <6s4i8ucqhtqokktlinsh60vh1frsajup3n@4ax.com>

Actually, the ALL_ type views will show only those objects the user has access to....

a small but significant point...

rkg100_at_erols.com (Ryan Gaffuri) wrote:

>SELECT TABLE_NAME
>FROM DBA_TABLES
>WHERE TABLE_NAME ='<MY TABLE>';
>
>Oracle maintains a series of data dictionary views that will tell you
>all the information you will need about what is in the database. They
>come in 3 types.. USER_(only what the current user owns),
>ALL_(everything), DBA_(more info pertinent to a DBA).
>
>SELECT VIEW_NAME
>FROM ALL_VIEWS
>WHERE VIEW_NAME LIKE 'DBA_%';
>
>There are some more DBA views than other types, but for most of them
>you can replace DBA_nameofview with USER_ or ALL_ Some DBA views have
>extra columns.
>
>
>
>
>"Philip Morrow" <cracker_at_mymorrow.com> wrote in message news:<3c5i8.78860$TV4.13070960_at_typhoon.tampabay.rr.com>...
>> Is there a way to test for the exsistance of a table with SQL code. I need
>> to test to see if a table exsists and if so drop it. If it doesn't the drop
>> table statement doesn't need to be executed.
>>
>> Thanks for the help.
>>
>> 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! ==----- Received on Fri Mar 08 2002 - 13:41:45 CST

Original text of this message

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