OUTPUT statement [Interactive SQL]
576
ESCAPE CHARACTER clause The default escape character for
characters stored as hexadecimal codes and symbols is a backslash (\), so
\x0A is the linefeed character, for example.
This can be changed using the ESCAPE CHARACTER clause. For example,
to use the exclamation mark as the escape character, you would enter
... ESCAPE CHARACTER ’!’
♦ SQL/92 Vendor extension
♦
Sybase Not applicable
♦ Place the contents of the employee table in a file, in ASCII format.
SELECT *
FROM employee;
OUTPUT TO employee.txt
FORMAT ASCII
♦ Place the contents of the employee table at the end of an existing file,
and include any messages about the query in this file as well.
SELECT *
FROM employee;
OUTPUT TO employee.txt APPEND VERBOSE
♦ Output the contents of the toString() method of the
JProd
column
to file:
SELECT JProd>>toString()
FROM jdba.product;
OUTPUT TO d:\temp\temp.txt
FORMAT ASCII HEXADECIMAL OFF
Standards and
compatibility
Examples