create procedure InsertRec
as
declare
@b type,
@c type,
begin
declare CurGetData cursor
for select b, c from dbf_name1
open CurGetData
fetch CurGetData into @b,@c
while @@fetch_status = 0
begin
insert dbf_name2 (b,c)
values (@b,@c)
fetch CurGetData into @b,@c
end
close CurGetData
deallocate CurGetData
end
//SQL Server中的存储过程三少 :o)
as
declare
@b type,
@c type,
begin
declare CurGetData cursor
for select b, c from dbf_name1
open CurGetData
fetch CurGetData into @b,@c
while @@fetch_status = 0
begin
insert dbf_name2 (b,c)
values (@b,@c)
fetch CurGetData into @b,@c
end
close CurGetData
deallocate CurGetData
end
//SQL Server中的存储过程三少 :o)
select a,b,c from dbf_name2