题解 | #查找当前薪水详情以及部门编号dept_no#

查找当前薪水详情以及部门编号dept_no

http://www.nowcoder.com/practice/c63c5b54d86e4c6d880e4834bfd70c3b

select t.* from (select a.*,b.dept_no from salaries a, dept_manager b where a.emp_no=b.emp_no) t order by t.emp_no

第一步:连接查询,查出所有领导的薪水
select a.,b.dept_no from salaries a, dept_manager b where a.emp_no=b.emp_no
第二步:对其排序按照 emp_no 排序
select t.
from (select a.*,b.dept_no from salaries a, dept_manager b where a.emp_no=b.emp_no) t order by t.emp_no

全部评论

相关推荐

评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务