I am trying to add a column to a database table and
PreparedStatement ps = con.prepareStatement(query);
ps.execute();
ps.close();
query is something like (valid SQL)
ALTER TABLE mytable ADD COLUMN mycolumn datatypeinfo
Anyway, it executes fine and the column is created. But the execute statement returns false. I tried with executeUpdate and that returns 0 rows.
Note that this whole thing is within a transaction with con.setAutoCommit set to false. So I am not sure if that is the problem. The issue is that I have to create the column before I can go ahead with other update queries. So it has to run in a transaction.