读书人

sql 批量处置 JDBC

发布时间: 2012-09-25 09:55:58 作者: rapoo

sql 批量处理 JDBC

con.setAutoCommit(false);String delSQL1="delete from tb_czxs_user1 where iddel="+id1+"";String delSQL2="delete from tb_czxs_user2 where iddel="+id2+"";stmt.addBatch(delSQL1);stmt.addBatch(delSQL2);stmt.executeBatch();con.commit();con.setAutoCommit(true);

读书人网 >其他数据库

热点推荐