Sql insert new employee name and department name department and having salary 6000
Answers
Answered by
0
The simplest way isselect max(sal) from Salary where sal in(select top 2 sal from Salary order by sal desc). select max(salary) from employee where emp_id not in (select TOP(n) from employee order by salary desc )In your case n =1,as you want 2nd highest salary .To get 3 highest or so on just replace n acordingly.
Similar questions