mue*_*lae 3 oracle oracle-sqldeveloper
我目前正在使用Oracle SQL Developer 4.0.1.14,做这样的事情:
UPDATE mytable SET myfield = 'myvalue' WHERE myotherfield = 234;
INSERT INTO mytable (myfield , myotherfield) VALUES ('abc', 123);
INSERT INTO mytable (myfield , myotherfield) VALUES ('abd', 124);
...
Run Code Online (Sandbox Code Playgroud)
......以及更多的线路.
如果运行整个脚本,则只能看到如下输出:
8 rows updated.
1 rows inserted.
1 rows inserted.
...
Run Code Online (Sandbox Code Playgroud)
在一个小脚本中,这不是问题,因为您可以很容易地看到哪一行导致了哪个输出.但是,如果您考虑使用1k行的脚本,找到"0行更新".哪个命令引起了,最终会感到沮丧.
所以我宁愿想要这样的输出:
> UPDATE mytable SET myfield = 'myvalue' WHERE myotherfield = 7393;
8 rows updated.
> INSERT INTO mytable (myfield , myotherfield) VALUES ('abc', 123);
1 rows inserted.
> INSERT INTO mytable (myfield , myotherfield) VALUES ('abd', 124);
1 rows inserted.
...
Run Code Online (Sandbox Code Playgroud)
我知道,在详细模式下运行脚本时,这在Sql*Plus中是可能的.但是这应该也可以在SQL Dev中实现,不应该吗?
如果有人能告诉我如何,我将非常感激.
非常感谢!
小智 5
尝试使用set echo on(sqlplus命令也适用于sql developer),例如
create table t(a varchar2(100));
set echo on
update t set a = 0;
update t set a = 0;
update t set a = 0;
Run Code Online (Sandbox Code Playgroud)
输出是(在F5之后 - 运行脚本)
table T created.
> update t set a = 0
0 rows updated.
> update t set a = 0
0 rows updated.
> update t set a = 0
0 rows updated.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5132 次 |
| 最近记录: |