Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> IF Exists SQL statement help

IF Exists SQL statement help

From: DG <dennis.grisbeck_at_software-innovation.no>
Date: 23 Aug 2002 03:28:06 -0700
Message-ID: <d6bd69c1.0208230228.b35b53@posting.google.com>


In Microsoft sequal server I have this statement:

if exists (select * from dbo.sysobjects where id = object_id('[my_table]') and OBJECTPROPERTY(id,'IsUserTable') = 1) DROP TABLE [my_table]
GO

this obviously checks to see if a table exists before executing the drop table statement.

what would the Oracle equivalent of this be?

Thanks from an Oracle newbie! Received on Fri Aug 23 2002 - 05:28:06 CDT

Original text of this message

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