我尝试执行以下代码,然后成功了。但是在目录中我没有看到我的文件。
declare
fp utl_file.file_type;
cursor c1 is select * from apr where rownum<=10;
begin
fp:=utl_file.fopen('FLAT_FILE_DIR','test2.txt','W');
for i in c1
loop
utl_file.put_line(fp,i.TERM_PERIOD||' '||i.FLAT_RATE_APR||' '||i.APR);
end loop;
utl_file.fclose(fp);
end;