1.<selectkey>
标签可以实现字段的自增实现
<selectKey order='BEFORE' keyProperty="id" resuletType="int">
select Max(id) + 1 from emp
</selectKey>
insert into tableName ("id", "name") values (#{id}, #{name});
2024-04-05 15:20:12
1.<selectkey>
标签可以实现字段的自增实现
<selectKey order='BEFORE' keyProperty="id" resuletType="int">
select Max(id) + 1 from emp
</selectKey>
insert into tableName ("id", "name") values (#{id}, #{name});
下一篇:sql子查询