注册

适配Mysql中的CASE WHEN THEN处理WHERE条件

灿烂的江河 2022/11/21 2424 9

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:dm8
【操作系统】:麒麟v7
【CPU】:x86
【问题描述】*:
THEN 子句想要处理 WHERE 后面的条件。
举例:

select * from tableName where case type when 0 then name = 'aaa' and 其他条件 when 1 then name = 'bbb' and 其他条件 when 2 then name = 'ccc' and 其他条件 else 1 = 1 end
回答 0
暂无回答
扫一扫
联系客服