sql - SQL Developer 工作表中的多个插入

标签 sql database oracle oracle-sqldeveloper

我刚刚安装了 SQL Developer 4,并且正在使用 Oracle Database 11g。我想一次在工作表中执行多个 insert into 语句。如果我通过 SQL 命令行复制粘贴,但在 Develop 4 中,这很好用,一次只插入一行。有没有什么办法解决这一问题?我不想逐行输入,也不想通过文本框直接通过数据选项卡输入。我希望能够在一个工作表中执行以下操作。请帮忙

INSERT INTO client_master(client_no,name,city,pincode,state,bal_due) VALUES ('c00001','ivan bayross','bombay',400054,'maharashtra',15000);
INSERT INTO client_master(client_no,name,city,pincode,state,bal_due) VALUES ('c00002','vandana saitwal','madras',780001,'tamil nadu',0);
INSERT INTO client_master(client_no,name,city,pincode,state,bal_due) VALUES ('c00003','pramada jaguste','bombay',400057,'maharashtra',5000);
INSERT INTO client_master(client_no,name,city,pincode,state,bal_due) VALUES ('c00004','basu navindgi','bombay',400056,'maharashtra',0);
INSERT INTO client_master(client_no,name,city,pincode,state,bal_due) VALUES ('c00005','ravi sreedharan','delhi',100001,'delhi',2000);
INSERT INTO client_master(client_no,name,city,pincode,state,bal_due) VALUES ('c00006','rukmini','bombay',400057,'maharashtra',0);

最佳答案

来自 the documentation (3.2 因为 4 仍然是测试版):

SQL Worksheet toolbar (under the Worksheet tab): Contains icons for the following operations:

Execute Statement executes the statement at the mouse pointer in the Enter SQL Statement box. The SQL statements can include bind variables and substitution variables of type VARCHAR2 (although in most cases, VARCHAR2 is automatically converted internally to NUMBER if necessary); a pop-up box is displayed for entering variable values.

Run Script executes all statements in the Enter SQL Statement box using the Script Runner. The SQL statements can include substitution variables (but not bind variables) of type VARCHAR2 (although in most cases, VARCHAR2 is automatically converted internally to NUMBER if necessary); a pop-up box is displayed for entering substitution variable values.

要一起运行多个语句,您需要从工具栏图标或按 F5 键运行脚本。

关于sql - SQL Developer 工作表中的多个插入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17831585/

相关文章:

mysql - Qt MySQL -------- 无法打开包含文件 : 'mysql.h' :

MySQL : making a field unique for each article id

oracle - 大量列的数据库模式设计

sql - 通过 Oracle SQL 检索范围内的数字

sql - 描述在 IBM DB2 中不起作用

c# - 带 Linq 的 Entity Framework 、内部连接、分组依据、排序依据

sql - 除了参数之外,SQL 中的 @ 符号是什么?

php - MySql查询优化方法

oracle - 如何识别 Oracle 死锁涉及的行?

oracle - 创建自动提交的 oracle 表