drop table #t
create table #t
(account char(20))
declare @account char(20)
declare jx cursor for
select account
from bank;
open jx;
fetch next from jx
into @account
while @@fetch_status=0
begin --加
insert into #t
select @account
fetch next from jx
into @account --移位置
end --加
close jx
deallocate jx
select * from #t
create table #t
(account char(20))
declare @account char(20)
declare jx cursor for
select account
from bank;
open jx;
fetch next from jx
into @account
while @@fetch_status=0
begin --加
insert into #t
select @account
fetch next from jx
into @account --移位置
end --加
close jx
deallocate jx
select * from #t
create table #t
(account char(20))insert into #t
select account
from bank;select * from #t