0
我试图更新从日食的数据库。数据库将更新,但是,在更新数据库后,java程序将抛出SQLException。SQL update语句将更新数据库,但会抛出SQL例外
Statement stmnt = null;
Connection connection = establishConnection();
stmnt = connection.createStatement();
stmnt.executeQuery("UPDATE table1 SET column2='"+description+"' WHERE column1='"+id+"'");
这就是被打印到控制台上:
org.postgresql.util.PSQLException: No results were returned by the query
检查: http://stackoverflow.com/questions/21276059/no-results-returned-by-the-query-error-in-postgresql –