Oraclesqlplus executes the SQL File

Source: Internet
Author: User
Tags ultraedit
Oracle executes the external file: c: sqlplususerpwd @ dbsql@new. SQL to execute multiple SQL files: 1. put all the files in the same directory, and then execute the command: c: dirbd: 1 in the command line. SQL outputs all SQL file names to one SQL file. 2. Use UltraEdit to open the generated SQL file, and switch alt + C to colu.

Oracle executes external files: c: sqlplus user/pwd @ db SQL @new. SQL to execute multiple SQL files: 1. put all the files in the same directory, and then execute the command: c: dir/B d: /1. SQL outputs all SQL file names to one SQL file. 2. Use UltraEdit to open the generated SQL file, and switch alt + C to colu.

Oracle executes external files:

C:> sqlplus user/pwd @ db

SQL> @ new. SQL

Execute Multiple SQL files:

1. Put all the files in the same directory, and then execute the command in the command line:
C:> dir/B> d:/1. SQL
All SQL file names are output to one SQL file.
2. Use UltraEdit to open the generated SQL file, switch alt + C to column mode, add "@" to all rows, and save.
3. Run @ d:/1. SQL in sqlplus"

How to Avoid '&' characters:

In SQL, parameters can be passed, but sometimes '&' needs to be inserted, for example:

SQL> select '& hello' v from dual;
Input hello value: hello
Original Value 1: select '& hello' v from dual
New value 1: select 'hello' v from dual

V
-----
Hello

You can avoid using the following methods:

A:

SQL> select chr (38) | 'hello' v from dual;

V
------
& Hello

B:

SQL> set define off
SQL> select '& hello' v from dual;

V
------
& Hello

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.