Oracle Foundation Execution SQL file

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.