First query if table exists e.g.
select tabname from syscat.tables where tabschema='myschema' and tabname='mytable'
and if he returns something, he will give out your
drop table myschema.mytable
Another possibility is to simply issue the drop command and catch an exception that will be raised if the table does not exist. Just put this code inside try {...} catch (Exception e) {// Ignore} for this approach.
source share