标签:标签 动态sql null color set 动态 status class test
1 update pro_sku 2 <set> 3 <if test="sku!=null and sku!=‘‘"> 4 sku=#{sku}, 5 </if> 6 <if test="sku_status!=null"> 7 sku_status=#{sku_status}, 8 </if> 9 <if test="sku_img!=null and sku_img!=‘‘"> 10 sku_img=#{sku_img}, 11 </if> 12 </set>
这是set,set标签会自动去除最后一个条件的,与where一样
标签:标签 动态sql null color set 动态 status class test
原文地址:http://www.cnblogs.com/tongs/p/7508793.html