The PUTF stored procedure writes text to a file according to a format string.
Applicability
This content applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support it.
Syntax
UTL_FILE.PUTF (
file IN FILE_TYPE,
format IN VARCHAR2,
arg1 IN VARCHAR2 DEFAULT NULL,
arg2 IN VARCHAR2 DEFAULT NULL,
arg3 IN VARCHAR2 DEFAULT NULL,
arg4 IN VARCHAR2 DEFAULT NULL,
arg5 IN VARCHAR2 DEFAULT NULL)
Parameters
Parameter |
Explanation |
|---|---|
| file | ByFOPENThe file handle opened in text write mode. |
| format | Format string.%sIn order:arg1toarg5Replace,\nRepresents the line terminator. |
| arg1 to arg5 | Used to replace the format string's%sOptional parameters of the command. You can specify up to five parameters. The default value of all parameters isNULL. |
Usage instructions
If format is NULL, no content is written. PUTF replaces at most five %s placeholders and can handle multiple \n characters in the format string.