mysql 更新语句中加判断条件

UPDATE
loan_overdue_list l set
l.type_status=(
CASE
WHEN l.overdue_days>(select c.overdue_one from loan_config c where c.gems_fs_id=l.gems_fs_id) THEN 11
WHEN l.overdue_days>(select c.overdue_two from loan_config c where c.gems_fs_id=l.gems_fs_id) THEN 12
WHEN l.overdue_days>(select c.overdue_three from loan_config c where c.gems_fs_id=l.gems_fs_id) THEN 13
ELSE l.type_status
END
)
,l.overdue_days=l.overdue_days+1
where
l.overdue_amount>0 and l.type_id=1

上一篇:java.lang.NoSuchFieldError: org.apache.http.message.BasicLineFormatter.INSTANCE


下一篇:系统级I/O