星期二是今天。- l' a$ \) U8 I8 q' }
为什么要这么做?SQL句子不是星期二吗?* t( x9 R( D3 r: ]9 u
SELECT CASE WHEN TO_CHAR(sysdate,'Day') = 'Tuesday' THEN 'Its Tuesday'ELSE 'Its Not Tuesday' END AS case_result,TO_CHAR(sysdate,'Day') AS dayFROM DUAL返回值:7 n: V4 Y' C( u: `- i
CASE_RESULT DAYIt's Not Tuesday Tuesday / K- ~3 }1 K. f$ J2 o4 i2 y8 R! ? 解决方案: