当前位置:Gxlcms > 数据库问题 > 动态SQL

动态SQL

时间:2021-07-01 10:21:17 帮助过:19人阅读

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

标签:标签   动态sql   null   color   set   动态   status   class   test   

人气教程排行