原创

Mysql Update Case When

如果submittime是null的话,则更新firstsubmittime字段,否则不变

update test set firstsubmittime=(case when submittime is null then now() else firstsubmittime end),
submittime = NOW() where id= 1
好羞涩,内容都被你看完了。。
该篇文章的评论功能已被站长关闭