为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:DM8
【操作系统】:
【CPU】:
【问题描述】*:下列语句从mysql迁移
update a set a.finish_time = if(finish_time is null or state is null, '2023-08-24', finish_time)
if 中 无法使用 is null,如果单条件可以使用达梦 IFNULL,但是这种多条件如何处理?
回答 0
暂无回答
Brant
应该可以用case when 来实现。可以试一下
update a set a.finish_time = case when finish_time is null or state is null then '2023-08-24' else finish_time end
应该可以用case when 来实现。可以试一下
update a set a.finish_time = case when finish_time is null or state is null then '2023-08-24' else finish_time end