我在 .sql 文件中执行下面的脚本。我正在使用 Windows 命令行控制台来调用 sqlplus。当脚本终止时,一切看起来都很好,除了我看不到 INSERT 语句添加的记录数。您还可以在下面看到输出:
脚本
WHENEVER SQLERROR EXIT 1 ROLLBACK
WHENEVER OSERROR EXIT 1 ROLLBACK
SET FEEDBACK ON
SET VERIFY ON
BEGIN
DBMS_OUTPUT.put_line('Output Nothing');
END;
/
INSERT INTO .........
COMMIT;
QUIT;
/
输出显示
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Apr 9 22:08:47 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
PL/SQL procedure successfully completed.
Commit complete.
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64
bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
当我在 TOAD/SQLNavigator 之类的工具上执行相同的 SQL 时,我可以看到添加的行数(参见下面的 ** 标记行)。
TOAD 上显示的输出
Processing ...
SET FEEDBACK ON
SQL*Plus command ignored.
Processing ...
SET VERIFY ON
SQL*Plus command ignored.
Processing ...
BEGIN
DBMS_OUTPUT.put_line('Doing Nothing');
END;
Doing Nothing
Processing ...
INSERT INTO .......
**11 row(s) inserted**
Processing ...
COMMIT
Processing ...
QUIT;
SQL*Plus command ignored.
你能告诉我哪个设置可能会帮助我获得受此 SQL 影响的行数,即使我通过 simple 运行此脚本'sqlplus'
?