查找各个部门当前(to_date='9999-01-01')领导当前薪水详情以及其对应部门编号dept_no

 

首先根据工号emp_no连接两个表,然后由于需要查询当前还处于在职状态的领导的薪水,所以需要加上

where s.to_date='9999-01-01'
and d.to_date='9999-01-01'

猜你喜欢

转载自www.cnblogs.com/jiguang321/p/11973781.html