Oracle说scalar subqueries are not valid expressions in the following places:
在CASE表达式的WHEN条件中
在GROUP BY和HAVING子句中
但是为什么以下查询不会给出任何错误。(不要去达到目的,我只是尝试一些随机的例子)
select case when (select id from employee where id=60)=60 then 1 end if from employee;
select id from employee group by id having (select id from employee where id=60)=60;
只有一个值为60的id