Toad for Oracle ..如何执行多个语句? [英] Toad for Oracle..How to execute multiple statements?

查看:415
本文介绍了Toad for Oracle ..如何执行多个语句?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些从Excel工作表生成的800-1200 INSERT语句.我想在TOAD-Oracle数据库中运行它们.

I have some 800-1200 INSERT statements generated from an excel sheet. I want to run these in TOAD - Oracle db.

如果我按 F9 ,它只运行一行,而 F5 给我语法问题,似乎不起作用?我在这里想念什么?

If I press F9, it runs only one line and F5 gives me syntax issue and do not seem to work? What am I missing here?

推荐答案

F9 仅执行一条语句.默认情况下,Toad将尝试在您的光标所在的位置执行该语句,或者将所有突出显示的文本都视为一条语句并尝试执行该语句.在这种情况下,不需要;.

F9 executes only one statement. By default Toad will try to execute the statement wherever your cursor is or treat all the highlighted text as a statement and try to execute that. A ; is not necessary in this case.

F5 是作为脚本执行",这意味着Toad将采用包含多个语句的完整突出显示的文本(如果未突出显示,则显示编辑器中的所有内容),并像以前那样执行SQL * Plus中的脚本.因此,在这种情况下,每个语句都必须后跟;,有时(在PL/SQL情况下)以/结尾.

F5 is "Execute as Script" which means that Toad will take either the complete highlighted text (or everything in your editor if nothing is highlighted) containing more than one statement and execute it like it was a script in SQL*Plus. So, in this case every statement must be followed by a ; and sometimes (in PL/SQL cases) ended with a /.

这篇关于Toad for Oracle ..如何执行多个语句?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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