再insert陳述句中加入 table是你要寫入的表_ID就是id, keyProperty就是接受物件中的id
<selectKey resultType="java.lang.Integer" keyProperty="id">
select SEQ_table_ID.CURRVAL from dual
</selectKey>
nextval的值是每呼叫一次就增加一次;currval的值呼叫時,還是和自身會話的當前值一樣
寫入后就可以在寫入的物件中取出 如下:
managefilemapper.insertIngle(managefilebo);
Integer id = managefilebo.getId();
uj5u.com熱心網友回復:
感謝分享!
建議記錄在博客中吧。
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/8507.html
標籤:開發
上一篇:ORACLE 存盤程序輸出結果
下一篇:求大佬幫忙做題
