I am writing a schema upgrade script for a product that depends on an Oracle database. In one area, I need to create an index on a table – if that index does not already exist. Is there an easy way to check for the existence of an index that I know the name of in an Oracle script?
It would be similar to this in SQL Server:
IF NOT EXISTS (SELECT * FROM SYSINDEXES WHERE NAME = 'myIndex')
// Then create my myIndex