简体   繁体   中英

Multiple insert into in SQL Developer worksheet

I just installed SQL Developer 4 and I'm using Oracle Database 11g . I want to execute multiple insert into statements in the worksheet at once. That works fine if I copy paste via command line of SQL but in Develop 4, only one row is being inserted at a time. Is there any way to fix this? I don't want to type line by line and also don't want directly enter via data tab though the textboxes. I want be able to execute the following in one single worksheet. Please help

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);

From the documentation (3.2 since 4 is still beta):

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.

To run multiple statements together you need to Run Script, either from the toolbar icon or by pressing F5.

在所有插入语句都在“查询”构建器窗口中之后,您可以“点亮”(控件A),然后同时单击“控件”和“ Enter”。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM