2013年(350)
分类: Oracle
2013-04-24 11:08:45
--方法1
declare
cursor tmp_cur(tmp_num NUMBER) IS select * from tables where part_num=tmpnum;
begin
for emp_record in tmp_cur(123) loop
.......
.......
end loop;
end;
--方法2
declare
begin
for emp_record in (select * from tables where part_num=123) loop
.......
.......
end loop;
end;