Table of Contents

SQL Plus - ACCEPT command (Console Interaction)

About

The accept command reads a line of input and stores it in a given substitution variable.

Syntax

ACC[EPT] 
   variable [NUM[BER] | CHAR | DATE | BINARY_FLOAT | BINARY_DOUBLE] 
   [FOR[MAT] format] 
   [DEF[AULT] default] 
   [PROMPT text | NOPR[OMPT]] 
   [HIDE]

where:

Example

ACCEPT pwd CHAR PROMPT 'Type your Password:  ' HIDE
ACCEPT salary NUMBER FORMAT '999.99' DEFAULT '000.0' PROMPT 'Enter weekly salary:  '
PROMPT You have enter: &salary