首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

sql 批量处置 JDBC

2012-09-25 
sql 批量处理 JDBCcon.setAutoCommit(false)String delSQL1delete from tb_czxs_user1 where iddel+i

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);

热点排行