- sql中的if–else语句
case when 'a' then 'b' else 'c' end
-- 若a为空则设置code为指定值
case when a is not null then a else '0000000000' end as code
case when a is null then '0000000000' else a end as code
- 筛选数据
where... (比较运算符)
where... in (...,...,...,)
where... like '..%...%..'
where... group by .. having...