SQL 中case when ...then...else ...end用法
CASE WHEN 基本概念Case具有两种格式:简单Case函数和Case搜索函数。简单Case函数: CASE sex WHEN ‘1’ THEN ‘男’ WHEN ‘0’ THEN ‘女’ ELSE ‘其他’ ENDCase搜索函数: CASE WHEN sex = ‘1’ THEN ‘男’ WHEN sex = ‘0...