从数据库中去多个值然后再做些要完成的工作
declare @basePath varchar(20),@id int
declare gameupdatecur cursor
for
select gamePath,id
from C_game
open gameupdatecur
fetch next from gameupdatecur into @basePath,@id
while @@fetch_status=0
begin
----此处你可以进行用获得的数据进行自己要进行的操作(增,删,改...)
print @basePath
print @id
fetch next from gameupdatecur into @basePath,@id
end
deallocate gameupdatecur