SQL Plus - Special Characters

About

Useful command in sqlplus.

Characters

Variables

&

The At & character is the default character that define a substitution variable. You can change it with the define system variable.

:

Command

Slash

The slash command (/):

  • is an end of statement character for a PL/SQL block in a script
  • is an alias for the run command. It runs the last query : /

Exclamation mark

The exclamation mark is an alias of the HOST command on Unix system. It permits to send an shell command.

SQL> !pwd
/home/oracle

Arobase

;

; is:

  • the end of a SQL command in a script
  • an alias to the LIST command

Escape

Anti-Slash

The anti-slash (\) is the default escape character

Environment Variable

Question mark

The question mark is the equivalent of the ORACLE_HOME directory when using the start command.

Example: to start the compilation script utlrp.sql

@?/rdbms/admin/utlrp.sql

Others

.

The Period is the default character of concat


Powered by ComboStrap