sql试题

1.取出表A中第31到第40记录

a.select top 10 from a where id not in(select top 30 from a)

b.select top 10 from a where id>( select max(id) from (select top 30 from a))

C.select * from
(
select  *,ROW_NUMBER() over(order by id desc)as newId from goods_products
)  t
where t.newid>30 and t.newid<40

posted @ 2011-11-03 15:41  咸鱼公子  Views(200)  Comments(0Edit  收藏  举报