6.1. Command-Line Syntax

SQL*Plus is a command-line utility and is usually invoked from a command prompt. The syntax for invoking SQL*Plus from a command prompt is as follows:

sqlplus [option] [username[/password][@hostname]] [@script] [parm1] [parm2] . . .

6.1.1. Keywords

option

Specifies an option that controls the operation of SQL*Plus and has the following syntax:

[-]
[-?]
[-M[ARKUP] HTML [ON | OFF] 
  [HEAD text] 
  [BODY text] 
  [ENTMAP {ON | OFF}] 
  [SPOOL {ON | OFF}]
  [PRE[FORMAT] {ON | OFF}]]
[-R[ESTRICT] {1 | 2 | 3}]
[-S[ILENT]] ]

-

Displays the use and syntax of the SQL*Plus command line and then exits to the operating system.

-?

Displays the version number for SQL*Plus and then exits to the operating system.

MARKUP HTML

Specifies that HTML output be generated for this SQL*Plus session.

ON

Specifies that HTML output be generated using the options specified.

OFF

Specifies that HTML output not be generated. This option is the default.

HEAD

Specifies that text be used as content for the <HEAD> tag. Heading text must be enclosed within quotes. By default, text is `<TITLE>SQL*Plus Report</TITLE>'.

BODY

Specifies that text be used as content for the <BODY> tag. Body text must be enclosed within quotes.

ENTMAP ON

Specifies that SQL*Plus display the special characters "<", ">", and "&" as the HTML entities &lt;, &gt;, and &amp;, respectively.

ENTMAP OFF

Specifies that SQL*Plus not change display of the special characters "<", ">", and "&".

SPOOL ON

Specifies that SQL*Plus write HTML ...

Get Oracle SQL: the Essential Reference 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.