Find all sectors of the current (to_date = '9999-01-01') leading the current salary details, and their corresponding department number dept_no

 

 

 

 

 

First, you join two tables based job number emp_no, then the need to query the current job is still in the leadership of the state's salary, so the need to add

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

 

 

Guess you like

Origin www.cnblogs.com/jiguang321/p/11973781.html