首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

mybatis 主键从增 insert后返回主键

2012-12-28 
mybatis 主键自增 insert后返回主键mybatis 主键自增?insert后返回主键 :insert idinsertStudentAutoKe

mybatis 主键自增 insert后返回主键

mybatis 主键自增?insert后返回主键 :

<insert id="insertStudentAutoKey" parameterType="StudentEntity">      <selectKey keyProperty="studentID" resultType="String" order="BEFORE">              select nextval('student')       </selectKey>          INSERT INTO STUDENT_TBL (STUDENT_ID,                                    STUDENT_NAME,                                    STUDENT_SEX,                                    STUDENT_BIRTHDAY,                                    CLASS_ID)                 VALUES   (#{studentID},                           #{studentName},                           #{studentSex},                           #{studentBirthday},                           #{classEntity.classID})       </insert>

?

热点排行