PL/SQL多行数据处理

1.游标
申明游标 使用时打开
cursor c_cursor is
....
open c_cursor;
loop
    fetch c_cursor into vo;
    exit when c_cursor%notfound;
    ...
end loop;
close c_cursor;

2.直接For
for table_columns_tmp in (select column_1,... from table_1... where ...) loop
    table_columns_tmp.column_1 --取值
    ...
end loop;

m_i number;
for m_i in 1 .. m_list.count loop
    m_list(m_i).fund_code
end loop;

猜你喜欢

转载自lysunki.iteye.com/blog/1756285