create table #t1(f1 varchar(10),f2 int)insert into #t1 select 'A', 2 insert into #t1 select 'B', 3select top 100 identity(int,1,1) id into #temp from sysobjects a,sysobjects bselect b.f1,a.id from #temp a join #t1 b on a.id<=b.f2drop table #temp drop table #t1
insert into #t1 select 'B', 3select top 100 identity(int,1,1) id into #temp from sysobjects a,sysobjects bselect b.f1,a.id from #temp a join #t1 b on a.id<=b.f2drop table #temp
drop table #t1