Re: Drop if exists
Posted in 1999
Yang, Heung-Soon — — source: Informix-list mailing list archive (1991-1998)
You can do it by checking system catalog tables like 'systables',
'sysprocedures', 'sysindexes'. And decide whether to drop or not..
joel_anderson@prosolution.com wrote:
> I have a very large script used to modify customer databases. The
> script drops tables, creates tables, and alters tables. The script
> also creates and executes dozens of stored procedures. This script
> runs from dbaccess.
>
> Is there a way in an SQL script to detect if a table, stored procedure,
> index etc. exists before dropping it?
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.