大虾帮忙解释下sqlserver top 1 语句为什么取到的不是第一条记录
select top 3 uid from dbo.Account order by uid desc 显示结果为
uid
3
2
1
select top 1 uid from dbo.Account where uid in (select top 3 uid from dbo.Account order by uid desc)
取到的uid是1
select top 2 uid from dbo.Account where uid in (select top 3 uid from dbo.Account order by uid desc)
取到的uid是 3 2
top 1 应该是取第一条记录 uid应该是3的 为什么取到是1?