mysql自动生成uuid的策略_mybatis+MySQL UUID主键生成策略

SELECT REPLACE(UUID(),‘-‘,‘‘) FROM DUAL

insert into spm_invoice (invoiceId, invoiceNum, invoiceItem,

invoiceDate, invoiceMoney, clientId,

clientDepId, linkMan, invoiceStatusId,

uploadFileName, uploadFilePath, uploadFileDate,

remark)

values (#{invoiceid,jdbcType=VARCHAR}, #{invoicenum,jdbcType=VARCHAR}, #{invoiceitem,jdbcType=VARCHAR},

#{invoicedate,jdbcType=DATE}, #{invoicemoney,jdbcType=DOUBLE}, #{clientid,jdbcType=INTEGER},

#{clientdepid,jdbcType=INTEGER}, #{linkman,jdbcType=VARCHAR}, #{invoicestatusid,jdbcType=VARCHAR},

#{uploadfilename,jdbcType=VARCHAR}, #{uploadfilepath,jdbcType=VARCHAR}, #{uploadfiledate,jdbcType=TIMESTAMP},

#{remark,jdbcType=LONGVARCHAR})

你可能感兴趣的:(mysql自动生成uuid的策略_mybatis+MySQL UUID主键生成策略)