create table a
( typeid int, styelid int, useridint
)
insert into a (1,1,1)insert into a (1,1,2)insert into a (1,1,3)
insert into a (1,2,4)insert into a (1,2,5)insert into a (1,2,6)
insert into a (1,3,7)insert into a (1,3,8)insert into a (1,3,9)
insert into a (2,1,10)insert into a (2,1,11)insert into a (2,1,12)
insert into a (2,2,13)insert into a (2,2,14)insert into a (2,2,15)
insert into a (2,3,16)insert into a (2,3,17)insert into a (2,3,18)
根据上面的测试数据,我想要得到每种typeid的每种Style的前2条记录,不想用游标,用游标的话可以解决,但是速度太慢了.
看哪位大哥可以帮下忙的,谢谢了