发布网友 发布时间:2022-04-21 22:46
共1个回答
热心网友 时间:2023-06-26 16:00
insert标签内 插入
<selectKey resultType="long" keyProperty="id">
SELECT SEQ_TEST.NEXTVAL FROM DUAL
</selectKey>
如
<insert id="User.insert" parameterType="User">
<selectKey resultType="long" keyProperty="id">
SELECT SEQ_USER.NEXTVAL FROM DUAL
</selectKey>
insert into
xxx(primaryName,alternateName,type)values(#{primaryName},#{alternateName},#{type})
</insert>
你能得到此时插入后的id