换一种方法试下:
select DISTINCT top 5 login from table where id >
(select max(id) from
(select DISTINCT top 5 id from table order by id) as T)
select DISTINCT top 5 login from table where id >
(select max(id) from
(select DISTINCT top 5 id from table order by id) as T)
我的sql server2005
select * from (
select DISTINCT top 5 login from table where Id not in (select DISTINCT top 5 Id from table
)A
order by Id