Primary key from inserted row jdbc?

后端 未结 7 1252
野趣味
野趣味 2020-12-05 06:23

Is there a cross database platform way to get the primary key of the record you have just inserted?

I noted that this answer says that you can get it by Calling

7条回答
  •  眼角桃花
    2020-12-05 06:56

    for oracle, Hibernate uses NEXT_VALUE from a sequence if you have mapped a sequence for PKEY value generation.

    Not sure what it does for MySQL or MS SQL server

提交回复
热议问题