1、where 条件的截取
AND RIGHT(name,4)
截取名字右四位
left(name,5)
截取左边五位
2、判断是否满足某种条件
(
CASE
WHEN CAST(
SUBSTR(
name,
3,
6
) AS UNSIGNED
) = b.name THEN
code
ELSE
NULL
END
) AS Status