declare @T table(id int,name varchar(10)) insert into @t select 1 ,'ds' union all select 2 ,'fds' union all select 3 ,'...' union all select 4 ,'...' union all select 5 ,'...' union all select 6 ,'...' union all select 8 ,'...' union all select 9 ,'...'select top 5 * from @t order by id desc
insert into @t select 1 ,'ds'
union all select 2 ,'fds'
union all select 3 ,'...'
union all select 4 ,'...'
union all select 5 ,'...'
union all select 6 ,'...'
union all select 8 ,'...'
union all select 9 ,'...'select top 5 * from @t order by id desc