SQL SERVER:CASE判断空,错误一例
时间:2021-07-01 10:21:17
帮助过:11人阅读
WHEN ‘‘ THEN
policy_sy_no
ELSE
policy_jq_no
END policy_no
FROM
ZY_SURVEY_VISIT order by FLOW_ID desc
---正确判断-----------------------------------------------------------------------------
SELECT
policy_jq_no,policy_sy_no,
CASE
WHEN policy_jq_no IS NULL THEN
policy_sy_no
ELSE
policy_jq_no
END policy_no
FROM
ZY_SURVEY_VISIT order by FLOW_ID desc
SQL SERVER:CASE判断空,错误一例
标签:nbsp esc oca cal com attr des -o .com