mysql 主鍵返回值
(1)主鍵返回之自增主鍵

(2)主鍵返回值UUID
UUID函數是mysql的函數mysql

Oracle主鍵返回值
(1)序列也就是sequence,它是Oracle的主鍵生成策略sql

(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>