批处理

来源:互联网 发布:小艾的张爱玲 知乎 编辑:程序博客网 时间:2024/04/29 07:04

(1)Statement的批处理

     --addBatchString sql):把要执行的sql语句加入其中

     --executeBatch():批量执行

(2)PreparedStatement的批处理

       --addBatch():把先前设置的参数加入其中

       --executeBatch():批量执行

注意:PreparedStatement的批处理只适合于插入、修改、删除操作。
原创粉丝点击