May 19, 2011 at 12:21 pm
Hi,
RDBMS : sqlserver 2005
how can I write select query to skip top n records?
I don't want to use order by and then top
May 19, 2011 at 12:30 pm
create table #aa
(
id int identity(1,1),
col1 varchar(30)
)
insert into #aa(Col1)
select col1 from yourtable
select * from #aa where id>10
Spandan Buch
May 19, 2011 at 12:32 pm
this is not thee way I am looking for
May 19, 2011 at 12:34 pm
select * from yourtab
except
select top(10) * from yourtab
Spandan Buch
May 19, 2011 at 12:55 pm
you can use the row number function to do paging...is that what you are looking for?
I don't want to use order by and then top
is this a homework or interview question?
Lowell
May 19, 2011 at 12:57 pm
thanks it worked 🙂
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply