编写一个SQL查询,从people表里面查询出薪资第二高的员工信息(薪资:peoplesalary)
1、先排序取出前两个工资高的员工,在从排名前两个员工中取出最小的即可
select * from people
where
PeopleSalary=(
select min(PeopleSalary) from (select distinct top 2 peopleSalary from people order by peopleSalary desc) as temp1 )