Re: to check if a table exists

From: <sybrandb_at_yahoo.com>
Date: 13 Apr 2004 00:36:19 -0700
Message-ID: <a1d154f4.0404122336.65ccc666_at_posting.google.com>


dottingthenet_at_hotmail.com (DottingTheNet) wrote in message news:<11bf8d5a.0404112139.78b6b18e_at_posting.google.com>...
> i promise no more silly questions after this
>
> but how do i check if a table exists??
> it is my understanding that the exists can only be used in the where
> clause of the query.
> i just want s'thing simple like
> if exists ('test')
> then ---good
> else
> --create it
> end if;
> thanx in advance!!!

When you have proper exception handling in your code, you don't NEED to check whether a table exists. Stop programming silly tests like this one, and LEARN pl/sql, start UNLEARNING your bad sqlserver habits NOW Oracle != Sqlserver.

Sybrand Bakker
Senior Oracle DBA Received on Tue Apr 13 2004 - 09:36:19 CEST

Original text of this message