SQL ELSE 取当前值
SQL ELSE take whatever the current value is
如果不符合上述条件,你能帮我写一下ELSE语句吗?我只想让它接受当前值。
CASE
WHEN (Country IS NULL AND (NAME like '%+US+%' OR NAME like '%US-%')) THEN "US"
WHEN (Country IS NULL AND (NAME like '%+CA+%' OR NAME like '%CA-%')) THEN "CA"
ELSE **take whatever it is in the Country column**
END AS Country,
对于“无论有什么”部分,请尝试
其他国家/地区
只需使用 ELSE COUNTRY
而不是 ELSE **take whatever it is in the Country column** END AS Country,
如果不符合上述条件,你能帮我写一下ELSE语句吗?我只想让它接受当前值。
CASE
WHEN (Country IS NULL AND (NAME like '%+US+%' OR NAME like '%US-%')) THEN "US"
WHEN (Country IS NULL AND (NAME like '%+CA+%' OR NAME like '%CA-%')) THEN "CA"
ELSE **take whatever it is in the Country column**
END AS Country,
对于“无论有什么”部分,请尝试
其他国家/地区
只需使用 ELSE COUNTRY
而不是 ELSE **take whatever it is in the Country column** END AS Country,