--题目:Employee表中有ID,Name,Salary三列,求薪资排序第二高的Employee的Name select * FROM [Employee] --等于2时为空,因为有并列第一 SELECT name from (select Name, RANK() over (order by salary desc) as rankIndex FROM [Test].[dbo].[Employee]) as temp where temp.rankIndex=2 -- 先找出前两高,然后…