WITH x AS(SELECT1AS id,'a1'AS name FROM DUAL UNIONALLSELECT2AS id,nullAS name FROM DUAL
)SELECT id
,CASEWHEN name ISNULLTHEN'我是null'ELSE'有值:'|| name ENDAS"通过case when判断", decode(name,NULL,'我是null','有值:'|| name)AS"通过decode判断"FROM X
sqlWITH x AS (SELECT 1 AS id,'a1' AS name FROM DUAL UNION ALL SELECT 2 AS id,null AS name FROM DUAL )SELECT id , CASE WHEN name IS NULL THEN '我是null' ELSE '有值:' || name END AS "通过case when判断" ,...