UPDATE degree SET status_ = case when start_time_ < now() and end_time_ > now() then 'START' when end_time_ <= now() then 'END' else 'NOT_START' end WHERE status_ != 'END' and start_time_ < now()