可不可以用一句sql语句并且不用top求出成绩最好的三个人的信息?
*/
--生成测试数据
create table t(id int ,score int)
insert into t
select 01,90 union all
select 02,80 union all
select 03,85 union all
select 04,87 union all
select 05,91
go
create table tb(xue int,chji int)
insert tb select 1,90
union all select 2,80
union all select 3,85
union all select 4,87
union all select 5,91
drop table #t
select *,id=identity(int) into #t from tb order by chji desc
select * from #t where id<4