mysql 主键返回值
(1)主键返回之自增主键
(2)主键返回值UUID
UUID函数是mysql的函数
Oracle主键返回值
(1)序列也就是sequence,它是Oracle的主键生成策略
(2)
<insert id="insert" parameterType="com.xxx.SystemDepartment">
<selectKey keyProperty="id" resultType="String" order="BEFORE">
select sys_guid() from dual
</selectKey>
insert into SYSTEM_DEPARTMENT (ID,DEPNAME, SUPERID, SORT, STATE)
values ( #{id,jdbcType=VARCHAR},#{depname,jdbcType=VARCHAR},
#{superid,jdbcType=DECIMAL}, #{sort,jdbcType=DECIMAL},
#{state,jdbcType=DECIMAL})
</insert>