Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Conditionally dropping tables in script
Hi,
Is there a way of detecting the existance of a table in Oracle and conditionally dropping it? In Transact SQL I can do the following:
IF EXISTS (
SELECT * FROM sysobjects WHERE id = object_id('<table name>')
AND sysstat & 0xf = 3
)
DROP TABLE <table name>
GO
Is there an Oracle equivalent?
Regards,
Simon.
Received on Thu Aug 01 2002 - 07:20:00 CDT
![]() |
![]() |