關於Java的PreparedStatement的executeBatch方法及海量數據存儲時的主鍵重複問題

PreparedStatement的executeBatch方法在執行insert語句時主鍵重複異常會被SQLiteException捕獲,不會被BatchUpdateException捕獲,被BatchUpdateException捕獲可根據getUpdateCounts方法獲得已更新的記錄數。java executeBatch方法自己是int[],它的length是成功執行的記錄數,但執行時遇
相關文章
相關標籤/搜索