The Oracle SQL*Plus command language

The following is a brief guide to some apsects of the command language used in the workshops.

Characters in bold are to be entered as they are. The characters not in bold are to be replaced with suitable strings. The square brackets enclose optional materials. The curly brackets enclose a list of choices, and the bar separates the choices.

For a list of commands available, type

help index

For details of an individual command, type

help command-name

Command formatNotes
@ { uri | filename[.ext]} [arg...] 
@@ { uri | filename[.ext]} [arg...]  

Runs a command file. @@ searches for nested commands. Quicker than typing start.

a[ppend] text   

Appends the text to the SQL buffer.

desc[ribe] tablename

Lists the attributes of a table.

edit

Opens a notepad window containing the SQL buffer, the most recent SQL command. Edit it, save it, close the window, then run it.

exit

Ends SQL*Plus.

pass[word] [username]

Changes the password. Prompts for the old password and the new password twice.

pause string

Outputs the string, then waits for the user to press Return.

prompt string

Outputs the string.

quit

Ends SQL*Plus.

remark string

Introduces a comment into a command file.

reserved words

Lists the reserved words.

r[un]

Executes the contents of the SQL buffer.

sav[e] file_name[.ext]

Saves the SQL buffer in a Windows file.

set system-variable

Changes the value of a system variable. There are lots of these.

show system-variable

Displays the value of the system variable. There are lots of these.

start { uri | filename[.ext] } [ arguments] 

Runs a command file. The default extension is "sql".