📜  准备好的语句更新 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:12.132000             🧑  作者: Mango

代码示例1
PreparedStatement statement = 
     connection.prepareStatement("UPDATE CUSTOMERS SET FNAME = ?, LNAME = ? WHERE ID = ?")) {
  statement.setString(1, customer.getFirstName());
  statement.setString(2, customer.getLastName());
  statement.setInt(3, customer.getId());