The value of
echo can be set to
on or
off and specifies if the text of commands (i. e.
SQL statements or
SQL*Plus commands) in an SQL script being executed with
start, @ or @@ are replicated to the console/terminal or not.
Simple test:
Here's a simple SQL script file:
prompt selecting a message
select
'hello world' message
from
dual;
In SQL*Plus, when run with echo on, it displays:
SQL> set echo on
SQL> @script
SQL> prompt selecting a message
selecting a message
SQL>
SQL> select
2 'hello world' message
3 from
4 dual;
MESSAGE
-----------
hello world
However, with echo off, it prints the (arguably much nicer) output
SQL> set echo off
SQL> @script
selecting a message
MESSAGE
-----------
hello world