SPOOL command

[ Home / SQLBatch Home / Documentation / Commands ]


SYNTAX

SPOOL [mode] file_name | OFF

DESCRIPTION

SPOOL command stores output to a file.

PARAMETERS

file_name Any valid file name. If you do not specify an extension the '.log' extension will be used by default.
mode If you specify > or nothing, the file_name will be truncated if it exists. Use >> to append to an existing file.

EXAMPLE 1

SQL>set echo off
SQL>spool test.sql
SQL>? ? this is a test
SQL>spool off
SQL>@@test
this is a test
SQL>spool >>test.sql
SQL>? ? this is another test
SQL>spool off
SQL>@@test
this is a test
this is another test



Copyright (C) 1999 - 2024 Anatoly Moskovsky Report a site problem