How to get generated keys from JDBC batch insert in Oracle?

后端 未结 2 698
孤独总比滥情好
孤独总比滥情好 2020-12-15 09:41

I am inserting many records using JDBC batch inserts. Is there any way to get the generated key for each record? Can I use ps.getGeneratedKeys() with batch ins

2条回答
  •  春和景丽
    2020-12-15 10:31

    It appears that Oracle 12c does not support combining auto-generated keys with batch update according to the following page:

    http://docs.oracle.com/cd/E16655_01/java.121/e17657/jdbcvers.htm

    See the subsection labeled "Limitations" under the section "Retrieval of Auto-Generated Keys"

提交回复
热议问题