<update id="update"> UPDATE table <trim prefix="set" suffixOverrides=","> <if test="a!=null and a!=''">a=#{a},</if> <if test="b!=null and b!=''">b=#{b}</if> </trim> where id=#{Id} </update>
<update id="update"> UPDATE table <trim prefix="set" suffixOverrides=","> <if test="a!=null and a!=''">a=#{a},</if> <if test="b!=null and b!=''">b=#{b}</if> </trim> where id=#{Id} </update>