步骤1 create table table1 (uID int,CRTime date);
步骤2 insert into table1 (uID) values (1);
步骤3 select case CRTime when null then sysdate else CRTime end from table1;但是步骤3取不到sysdate的值?请问应如何取?谢谢
步骤2 insert into table1 (uID) values (1);
步骤3 select case CRTime when null then sysdate else CRTime end from table1;但是步骤3取不到sysdate的值?请问应如何取?谢谢
select case when CRTime is null then sysdate else CRTime end from table1;
select NVL(CRTime,SYSDATE) from table1;
1* select case when CRTime is null then sysdate else CRTime end from table1
SQL> /CASEWHENCRTIME
--------------
20-7月 -10SQL> select nvl(CRTime,sysdate) from table1;NVL(CRTIME,SYS
--------------
20-7月 -10