有没有办法将语句 1 和 2 组合成 1 个查询?谢谢。
String statement1 = "UPDATE thing SET status = ? WHERE id = ?";
String statement2 = "UPDATE thing SET error_message = ? WHERE id = ?";
PreparedStatement preparedStatement = connection.prepareStatement(statement1);
preparedStatement.setInt(1,status);
preparedStatement.setInt(2, id);
connection.prepareStatement(statement2);
preparedStatement.setInt(1,error_message);
preparedStatement.setInt(2, id);