ibatis插入返回自增值

<insert id="insert" parameterClass="Person">
    insert into person(name,pswd) values(#{name},#{pswd})

    <selectKey resultClass="java.lang.Integer" keyProperty="id" >

      SELECT  @@IDENTITY

    </selectKey>

</insert>

猜你喜欢

转载自xh32t03.iteye.com/blog/2307441