输入banner图图片脚本导航/分类

MyBatis插入时候获取自增主键方法

MyBatis 3.2.6插入时候获取自增主键方法有二 以MySQL5.5为例: 方法1: lt;insert id=insert parameterType=Person use

MyBatis插入时候获取自增主键方法

[日期:2014-03-27] 来源:Linux社区 作者:lavasoft [字体:]

MyBatis 3.2.6插入时候获取自增主键方法有二

以MySQL5.5为例:

方法1:


insert into person(name,pswd) values(#{name},#{pswd})

方法2:



select LAST_INSERT_ID()

insert into person(name,pswd) values(#{name},#{pswd})

插入前实体id属性为0;

插入后实体id属性为保存后自增的id;

linux

  • 0
  • ORA-20079: full resync from primary database is not done

    ORA-27300,ORA-27301,ORA-27302