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