我刚刚安装了 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/