Im在.sql文件中的Script下執行。我正在使用Windows命令行控制檯來調用sqlplus。當腳本終止一切看起來不錯時,除了我看不到INSERT語句添加的記錄數。你可以看到輸出也低於:SQLPLUS不打印受影響的行數
SCRIPT
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,我可以看到添加的行數(請參閱下面的**標記行)。
OUTPUTDISPLAYED蟾蜍
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影響的行數,甚至當我運行通過簡單的'sqlplus'
這個腳本?
的可能重複的[PLSQL過程內INSERT沒有告訴行數插入了多少行](http://stackoverflow.com/questions/4139945/insert-inside-plsql-procedure-does-not-tell-how-many-rows-were-inserted) – paxdiablo 2012-04-10 02:36:07
不會出現INSERT是但是,在一個pl/sql塊中。 – DCookie 2012-04-10 03:16:30