In actual application, multiple insert statements may be executed at a time. I know two ways to share with you:
1. Write the statement block in tools such as PLSQL between begin end, for example:
Begin
Insert into table values (....);
Insert into table values (....);
Insert into table values (....);
Insert into table values (....);
End;
Remember to add a semicolon after end
2. Run the SQL file by using commands, that is, write multiple SQL statements into one SQL file. For example, there is a. SQL file under the root directory of drive D. The content of a. SQL is as follows:
Insert into table values (....);
Insert into table values (....);
Insert into table values (....);
Insert into table values (....);
Run the CMD command to log on to sqlplus. After Successful Logon, enter @ d:/a. SQL.
3. You can use PLSQL Developer 7.0 to directly execute multiple statements. Each statement must be separated.
--------------------------------------- The following content is reproduced ----------------------------------------------
Objective: To execute multiple SQL statements at a time in PLSQL. Note: it may be difficult to query statements such as SELECT, because which of the result output sets prevails? (Guess: Is the last execution result correct ?) The current idea is to create multiple views at a time. Solution 1: Create a new Command Window, write multiple statements on its Editor page, and then execute! :) Solution 2: write a script, save it to c:/, and then use SQL> c:/1. SQL solution 3: Write a stored procedure, and then execute it (to be sorted)