sql server下实现插入数据后能够得到新插入数据的id
<selectKey keyProperty="id" order="AFTER" resultType="long">
select @@IDENTITY as id
</selectKey>
insert into LJMeasureProcessPoint
(mpid, housename, pointposition, typeid)
values (#{mpID},#{HouseName},#{pointPosition},#{TypeID})
</insert>
mysql
SELECT LAST_INSERT_ID()
网友评论