oracle中的一个别名问题 本帖最后由 taotai110 于 2011-12-14 16:42:29 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这个别名的e是什么意思啊?外层emp的表的别名啊(select * from emp e );怎么理解它是本部门的?后面不是有deptno= e.deptno(select avg(sal) from emp where deptno= e.deptno) 有分外层emp表和内层emp表的?内容不一样的?不都是emp的内容吗? select * from emp e where sal>(select avg(sal) from emp where deptno=你的部门号) and deptno=你的部门号;应该这样写吧,你那个语句应该是查出每个部门里面薪酬高于平均薪酬的员工 select t.empno, t.deptno, t.sal from emp t where t.sal > (select avg(tt.sal) from emp tt where tt.deptno = t.deptno) order by t.deptno 这个是相关查询,里面的e.deptno会和外面的deptno做比较 求助,相关子查询优化!!!急啊~~ Pro*C编译问题(oraxlc命令没有找到) 关于不安装客户端的问题 取字符串数字部分 ASP+oracle 无法链接 一个关于Oracle表空间的问题 请教一条统计SQL语句的写法,谢谢 菜鸟对参数文件的迷惑 Blob and Clob select j.user_id,s.username from AR_JPUSH_USER j join sysuser s on s.userid = j. ORA-12154: TNS: 无法解析指定的连接标识符 手动安装oracle,最后执行安装数据字典的时候说不能打开文件
外层emp的表的别名啊(select * from emp e );怎么理解它是本部门的?
后面不是有deptno= e.deptno(select avg(sal) from emp where deptno= e.deptno)
from emp t
where t.sal >
(select avg(tt.sal) from emp tt where tt.deptno = t.deptno)
order by t.deptno