2011年10月23日
摘要: where 是对原始数据的过滤having是对分组后的记录的过滤join on中的On是连接条件输出工资最高的前三名的每个员工的姓名,工资,工资等级,部门名称select top 3 emp.ename ,emp.sal,dept.dname,salgrade.gradefrom empjoin depton emp.deptno = dept.deptnojoin salgradeon emp.sal between salgrade.losal and salgrade.hisalwhere emp.ename not like '%A%'order by sal desc 阅读全文
posted @ 2011-10-23 12:16 c3tc3tc3t 阅读(157) 评论(0) 推荐(0)