java,
分享于 点击 28427 次 点评:269
java,
public static void main(String[] args) {
Connection connection = DBConnection.getConn();
PreparedStatement preparedStatement = null;
ResultSet resultSet = null;
int isResultSet;
try {
String sql = "delete from person where name = ?";
preparedStatement=connection.prepareStatement(sql);
preparedStatement.setString(1, "alex");
isResultSet = preparedStatement.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
}finally{
DBConnection.close(connection, preparedStatement, resultSet);
}
}
相关文章
- 暂无相关文章
用户点评