如何将某个字段更新为 null?
作者: renwuqiang创建于 2024年12月24日更新于 2024年12月24日
我想将数据库中的某个字段更新为 null。例如: Student student = new Student(); student.setId(1); student.setAge(null); studentMapper.updateByPrimaryKeySelective(student); 我只想将 age 更新为 null,其余字段不变。是否支持?
内容来源: abel533/Mapper