SQL> desc test;
名称
是否为空? 类型
----------------------------------------- -------- ----------------------------
A
DATE
B
NUMBER(38)
SQL>select * from test where b=(select case count(*) when 0 then '2'else '1' end from test where b='1');
A
B
---------- ----------
1
SQL> delete from test where b=1;
已删除 1 行。
SQL> commit;
提交完成。
SQL>select * from test where b=(select case count(*) when 0 then '2'else '1' end from test where b='1');
A
B
---------- ----------
02-1月 -08
2
SQL>