SQL Plus - Special Characters

> Procedural Languages > (SQL Plus|SqlCl) (Oracle Database Console)

1 - About

Useful command in sqlplus.

Advertising

3 - Characters

3.1 - Variables

3.1.1 - &

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

3.1.2 - :

3.2 - Command

3.2.1 - 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 : /

3.2.2 - 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
Advertising

3.2.3 - Arobase

3.2.4 - ;

; is:

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

3.3 - Escape

3.3.1 - Anti-Slash

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

3.4 - Environment Variable

3.4.1 - 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
Advertising

3.5 - Others

3.5.1 - .

The Period is the default character of concat

lang/sqlplus/special.txt · Last modified: 2017/09/06 19:29 by gerardnico