//批量更新的高级方法
@Update("<script>" +
" update bns_pv_special set product_PPV= " +
" <foreach item='item' collection='bnsPvSpecial' separator=' ' open='case dist_no ' close='end'>" +
" when #{item.distNo} then #{item.productPpv}" +
"</foreach>" +
" where dist_no in" +
" <foreach item='item' collection='bnsPvSpecial' separator=',' open='(' close=')'>" +
" #{item.distNo} " +
" </foreach>" +
"</script>")
void updateMary(@Param("bnsPvSpecial") List<BnsPvSpecial> bnsPvSpecial);
//从某张表里面更新数据到另一张(结构相同)更新
UPDATE customer c,area a SET c.sell_before_man=a.sell_before_man WHERE a.`name`=c.`name`
//插入的
insert into A ()(select * from B)