Q:
How can we read and write operating system files from PL/SQL program?
Answer
The UTL_FILE database package can be used to read and write operating system files. You need to have read /write access rights in that directory before the package can be used.
Example to write file:
Fhandler is a variable of type UTL_FILE.FILE_TYPE
UTL_FILE.PUTF(fHandler, 'Im writing to a file\n');
Example to read file:
UTL_FILE.GET_LINE(fHandler, buf);
View answer
Workspace
Report Error
Discuss