Closed
Description
Submitted by: eXandr (i.reg)
Votes: 4
It should be possible to determine not cause an error when deleting an object that does not exist
Something like that:
execute statement 'ALTER TABLE SOME_TABLE DROP [IF EXISTS] SOME_FIELD'; -- no raise error if field SOME_FIELD is not exist
or
execute statement 'DROP INDEX IDX1 [IF EXISTS]'; -- no raise error if index IDX1 is not exist
Workaround for now is:
begin
execute statement 'ALTER TABLE SOME_TABLE DROP SOME_FIELD';
when any do
begin
end
end
But this solution hides any error that is very bad. Another solution is to access the system tables, but it requires more code and can add even more errors.