JDBC删除
1 if(conn != null){
2 String temps="3";
3 conn.setAutoCommit(false);
4 PreparedStatement preparedStatement = conn.prepareStatement(SQL_USER_DELETE);
5 preparedStatement.setString(1,temps);
6 int line =preparedStatement.executeUpdate();conn.commit();
7 if(line>0)
8 out.print("删除了"+line+"条数据!");
9 preparedStatement.close();
10 }
11 conn.close();
好看请赞,养成习惯:) 本文来自博客园,作者:靠谱杨, 转载请注明原文链接:https://www.cnblogs.com/rainbow-1/p/13912161.html
欢迎来我的51CTO博客主页踩一踩 我的51CTO博客
文章中的公众号名称可能有误,请统一搜索:靠谱杨的秘密基地