Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to echo sql statements in sqlplus
dbaplusplus_at_hotmail.com schrieb:
> I am using Oracle 9.2.0.5 on HP UNIX 11i
>
> I have a shell script:
>
> sqlplus << !
> set echo on;
> set feedback on;
> select * from tab1;
> select * from tab2;
> select * from tab3;
> !
>
> I want statements such as select to be shown in addition to returned
> data from the select's. I thought that is purpose of set echo on. I do
> not see any difference in
> set echo on;
>
> or
>
> set echo of;
>
There is no difference.
The difference is only if you execute an sql script ( with the command
@, @@ or start), in this case set echo on does echo of the script, if
you type your statements directly in sqlplus ( what you are actually
doing by means of redirecting your stdin).
Best regards
Maxim Received on Mon Dec 12 2005 - 02:51:15 CST