Oracle executes external files:
C:>sqlplus user/[email protected]
sql> @new. sql
Execute multiple SQL files:
1. Place all the files in the same directory and execute the command at the command line:
c:>dir/b > D:/1.sql
All the SQL file names are exported to a SQL document.
2. Open the generated SQL file with UltraEdit, ALT+C switch to column mode, and add an "@" to all the lines before saving.
3. Perform "@d:/1.sql" in Sqlplus
How to avoid the ' & ' character:
& in SQL can pass parameters, but sometimes you need to insert ' & ', for example:
sql> Select ' &hello ' V from dual;
Enter a value for Hello: Hello
Original value 1:select ' &hello ' V from dual
New value 1:select ' Hello ' V from dual
V
-----
Hello
You can use the following methods to avoid:
A:
Sql> Select Chr (38) | | ' Hello ' v from dual;
V
------
&hello
B:
Sql> set Define Off
sql> Select ' &hello ' V from dual;
V
------
&hello
Oracle Foundation Execution SQL file