Oracle Import SQL script execution and common commands

Source: Internet
Author: User

Inside the Sql_plus execution: sql> @full_path/test.sql; Example:sql>@d:/test.sql;
No commit required; Generally in the Test.sql inside the last add a commit;
However, it is important to note that ";" must be added to each statement in the Test.sql file to represent the execution of a statement.

Common operations:

The [email protected] command invokes the current directory, or specifies a full path, or a script file that can be searched through the SQLPATH environment variable. This command is used to specify the full path of the file to be executed, otherwise the specified file is read from the default path (as specified by the SQLPath variable).
@@ 用 used in SQL script files to indicate that the SQL script file executed with @@ 用 in the same directory as the @@ 用, without specifying the full path to execute the SQL script file, or looking for the SQL script file from the path specified by the SQLPATH environment variable, which is typically used in a script file.
For example, the contents of the file Start.sql and Nest_start.sql,start.sql script files in the C:temp directory are:
@ @nest_start. SQL-Equivalent to @ c:tempnest_start.sql we are in Sql*plus, so execute: sql> @ c:tempstart.sql

2. Edit the current input Sql>edit


3. Rerun the last SQL statement that was run sql>/


4. Output the displayed content to the specified file sql> SPOOL file_name
Everything on the screen is included in the file, including the SQL statement you entered.

5. Turn off SPOOL output sql> SPOOL off
Only the spool output is turned off to see the output in the output file.

Oracle Import SQL script execution and common commands

Related Article

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.