pgsql --批量修改

工具:mybatis+pgsql
详见pgsql官方文档

案例

dao层

void update(List<User> userList);

sql

<update id = "update"  parameterType="java.util.List">
	<foreach collection = "list" item = "val" index = "index" open="" close=""separator=";">
		update  user 
		   set  username = #{val.username},
		        address = #{val.address}
		 where  id = #{val.id}
	</foreach>
</update>

上一篇:linux下安装postgresql-10 全网最详细的步骤安装


下一篇:PostgreSQL入门