【发布时间】:2012-08-10 10:57:57
【问题描述】:
我对在 where 子句之后或在提到 table_name 之后的任何地方使用聚合函数感到完全困惑
http://viditkothari.co.in/post/27045365558/sql-commands-1 上发布的 EMP 表
查询信息:
显示所有sal等于deptno 30的任何emp的emp
建议查询:
select *
from employee_4521
where sal having (select sal
from employee_4521
where deptno = 30);
返回以下错误:
第 1 行出现错误:
ORA-00920: 无效的关系运算符
在有子句的“h”下标有星号
【问题讨论】:
-
如果您需要提出第二个问题,请随时创建第二个线程。如果您在一个线程中提出多个不相关的问题,事情就会变得复杂。
标签: sql oracle oracle11g aggregate