首页 > Linux操作系统 > Linux操作系统 > Interactions with PL/SQL(2) How to read multiple lines from the text file using
declare
f utl_file.file_type;
s varchar2(200);
begin
f := utl_file.fopen('e:test','sample.txt','R');
loop
utl_file.get_line(f,s);
dbms_output.put_line(s);
end loop;
exception
when NO_DATA_FOUND then
utl_file.fclose(f);
end;
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/45259/viewspace-134874/ ,如需转载,请注明出处,否则将追究法律责任。