open cur_servhis;
loop
fetch cur_servhis into thisservhis;
exit when cur_servhis%notFound;
end loop;
if cur_servhis%rowcount = 0 then
insert into ......
end if;
close cur_servhis;
loop
fetch cur_servhis into thisservhis;
exit when cur_servhis%notFound;
end loop;
if cur_servhis%rowcount = 0 then
insert into ......
end if;
close cur_servhis;
open c;
loop
fetch c into user_id,user_name;
if c%rowcount=0 then
insert into dinya_user values(1,'E');
commit;
exit;
end if;
end loop;
close c;
end ;