create table #temp
(
id int,
分数 decimal(10, 1)
)
insert #temp
select 1,35 union all
select 2,0 union all
select 3,75 union all
select 4,0 union all
select 5,37 union all
select 6,74 union all
select 7,45 union all
select 8,0 union all
select 9,34.5
go
select * from #temp
select top(1) * from #temp order by abs(分数-34)
select * from #temp where 分数=(select MIN(分数) from #temp)
select top(1) with ties * from #temp order by 分数