仅在TOAD中使用execute运行多个sql语句 [英] Run multiple sql statements using only execute in TOAD

查看:622
本文介绍了仅在TOAD中使用execute运行多个sql语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用Execute命令在TOAD中运行多个select SQL语句,而不是像脚本一样执行.每个语句以分号结尾,但不幸的是TOAD不允许我这样做.

I am trying to run multiple select SQL statements in TOAD using Execute command and not as execute as a script, Each statement ending with a semicolon but unfortunately TOAD is not allowing me to do this.

尝试通过使用begin和end作为单个块运行,但是该尝试也失败了.

Tried running as a single block by using begin and end but that attempt also failed.

有没有办法做到这一点.

Is there any way to achive this..

推荐答案

您可以在Toad中将其作为脚本运行:

you can run it as a script in Toad:

exec dbms_output.put_line('aaa');
exec dbms_output.put_line('bbb');

或使用以下匿名PL/SQL块并将其作为语句执行:

or use the following anonymous PL/SQL block and execute it as a statement:

begin
    dbms_output.put_line('aaa');
    dbms_output.put_line('bbb');
end;
/

这篇关于仅在TOAD中使用execute运行多个sql语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆