yves pielusenet wrote:
I wonder if there is something similare like :
'drop index id_index if not exists' ?
I want to put a condition on a drop statement but it fails.
how can I do ?
thanks ,
Did you mean 'DROP INDEX <name> IF EXISTS ?
In any case, currently Derby does not support IF EXISTS in the DROP
statement.
Not sure if this helps:
But, if you are using JDBC, you could execute the 'DROP INDEX <name>' ,
catch the
SQLException to check for the SQLState of 42X65 and print a useful
message instead stating
index does not exist. If the index exists the drop should go through
successfully.
-Rajesh