【发布时间】:2019-02-18 21:11:27
【问题描述】:
这是查询,我想在 oracle 中使用带有 count 函数的 case 语句。
Select case when count(*) > 0 then 'doSomething' else 'doSomething'
from student where student_name='faizan ahmed' and student_father='ahmed' and UPPER(student_dob)=UPPER('01-FEB-19');
请帮助我,使用 plsql 代码。
ORA-00905: 缺少关键字 00905. 00000 - “缺少关键字”
【问题讨论】:
-
您在
CASE表达式的末尾缺少END。 -
case when count(*) > 0 then 'doSomething' else 'doSomething' end