MYSQL using the bulk delete xml

If the parameter is an array of array

 

	<update id="deleteAll">
		delete from C_V
		WHERE UUID in
		<foreach item="item" index="index" collection="array" open="("
			separator="," close=")"> #{item}
		</foreach>
		<include refid="where_appCode"/>
	</update>


If the argument is the object properties

 

 

	<update id="deleteAll">
		delete from C_V
		WHERE UUID in
		<foreach item="item" index="index" collection="code" open="("
			separator="," close=")"> #{item}
		</foreach>
		<include refid="where_appCode"/>
	</update>

 

Guess you like

Origin www.cnblogs.com/null/p/11207614.html