「Oracle」case when式のサンプル

書式
CASE
WHEN 条件 THEN xxx
使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
CASE
WHEN TT.USER_ID IS NULL
THEN "119"
WHEN TT.USER_ID IS NOT NULL
THEN "110"
END
CASE WHEN TT.USER_ID IS NULL THEN "119" WHEN TT.USER_ID IS NOT NULL THEN "110" END
CASE 
  WHEN TT.USER_ID IS NULL 
   THEN "119"
  WHEN TT.USER_ID IS NOT NULL
    THEN "110"
 END

 

Oracle

Posted by arkgame