<update id="updateStudent" parameterType="StudentsScore" >
update student_score
<set>
<if test="name!=null and name!=''">name=#{name},</if>
<if test="score!=null and score!=''">score=#{score}, </if>
</set>
where id=#{id}
</update>
上面的逗号:“,”不可以省略,mybatis可以根据参数情况,智能的去掉多余的逗号:”,”