A Tool Similar to SQL7 EXISTS

From: Parviz Siamak <siac_at_ma.ultranet.com>
Date: Wed, 23 Feb 2000 19:50:52 -0500
Message-ID: <38B4806C.3A85E937_at_ma.ultranet.com>



Hi,

[Quoted] Is there a macro or utility which can be used in SQL to test existence of a table prior to dropping the table?

There is a tool in Sybase and/or SQL7 which goes like this

IF EXISTS (SELECT table_name from ....)
DROP TABLE table_name

Now, in Oracle you have to do lot more to find out if the table exists or not.
I can use the DROP TABLE table_name and ignore the error message telling me that table does not exists.

But, I hate seeing error messages passing by when you have a huge script going thru a big setup. The clients sometimes get spooked and start asking all kinda scared questions.

So, if you know of an easy way to do this, please, let me know. Much appreciated.

Parviz

PS-There is an EXISTS which is to check a table item at a specific row. But, this is not going to do the trick. Received on Thu Feb 24 2000 - 01:50:52 CET

Original text of this message