Name

At Sign (@)

Synopsis

The at sign executes a SQL*Plus script file. A script file is a text file containing SQL*Plus commands. The commands appear in the file just as you would enter them from the keyboard. See Chapter 2 and Chapter 8 for an introduction to this command. Also see the @@ and START commands.

From iSQL*Plus, you can only run scripts via http or ftp.

Syntax

@{url | file} [argument [argument . . . ]]

Parameters

url

Is a URL, either http or ftp, pointing to a script that you wish to execute. Oracle9i Database Release 1 brought this option to SQL*Plus on Windows; Oracle9i Database Release 2 brought it to SQL*Plus on all platforms.

file

Is the name of the file you want to execute, which may include the path and extension. The default extension is .sql. If you don't specify a path, SQL*Plus looks for the file first in the current working directory and then searches each directory listed in the SQLPATH environment variable. See Chapter 14 for information about customizing the search path.

argument

Is an argument you wish to pass to the script. You may pass as many arguments as you like. Arguments must be separated from each other by at least one space. Arguments may be enclosed in quotes, and should be if they contain spaces. Either single or double quotation marks may be used, at your discretion. Your script may reference the first argument as &1, the second as &2, and so forth.

Get Oracle SQL*Plus: The Definitive Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.