when 无法进行null 判断,可以在case中使用 is null 进行true false判断代替
SELECT s.id, CASE tmp.id IS NULL WHEN TRUE THEN s.shopname ELSE CONCAT('[aaa]', s.shopname) END AS shopname FROM t_strategy s LEFT JOIN tmp ON s.id = tmp.id
when 无法进行null 判断,可以在case中使用 is null 进行true false判断代替
SELECT s.id, CASE tmp.id IS NULL WHEN TRUE THEN s.shopname ELSE CONCAT('[aaa]', s.shopname) END AS shopname FROM t_strategy s LEFT JOIN tmp ON s.id = tmp.id