update exam_record
set submit_time='2099-01-01 00:00:00',score=0
where start_time<'2021-09-01' and score is null
不知道这里为什么score is null而不是score = null
查了一下
is null 是判断某个字段是否为空,为空并不等价于为空字符串或数字为0
= null 是判断某个值是否等于null
还是似懂非懂。。。
update exam_record
set submit_time='2099-01-01 00:00:00',score=0
where start_time<'2021-09-01' and score is null
不知道这里为什么score is null而不是score = null
查了一下
is null 是判断某个字段是否为空,为空并不等价于为空字符串或数字为0
= null 是判断某个值是否等于null
还是似懂非懂。。。