CREATE TABLE test ( id int primary key identity, names varchar(20) ) insert into test values('bbb'); select top 10 * from ( select row_number() over(order by id desc, names desc) as rownumber,* from test where names='bbb' ) A where rownumber > 0