我试图在数据库表和数据库表中增加一栏。
PreparedStatement ps = con.prepareStatement(query);
ps.execute();
ps.close();
问 问 问 题(validkou)
ALTER TABLE mytable ADD COLUMN mycolumn datatypeinfo
无论如何,它执行罚款,并设立一栏。 但执行声明有误。 我以处决方式进行了审判,返回人数为零。
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.