If i issue a DDL, say "alter table", by stmt.execute() or stmt.executeUpdate(), is there any way I can check if the statement is successfully executed in the db? The return value of stmt.executeUpdate() is int and is 0 for DDL. So, is there any way to differentiate between a successful DDL vs a failed one?
posted 11 years ago
It should throw a SQLException. You could try it out with simple DDL that will obviously fail.