|SQL*Plus User's Guide and Reference
Part Number A88827-02
Command Reference, 6 of 52
ACC[EPT] variable [NUM[BER]|CHAR|DATE] [FOR[MAT] format] [DEF[AULT] default]
[PROMPT text|NOPR[OMPT]] [HIDE]
Reads a line of input and stores it in a given user variable.
Refer to the following list for a description of each term or clause:
Specifies the input format for the reply. If the reply does not match the specified format, ACCEPT gives an error message and prompts again for a reply. The format element must be a text constant such as A10 or 9.999. See the COLUMN command in this chapter for a complete list of format elements.
Oracle date formats such as "dd/mm/yy" are valid when the datatype is DATE. DATE without a specified format defaults to the Oracle NLS_DATE_FORMAT of the current session. See the Oracle9i Administrator's Guide and the Oracle9i SQL Reference for information on Oracle date formats.
To display or reference variables, use the DEFINE command. See the DEFINE command in this chapter for more information.
To display the prompt "Password: ", place the reply in a CHAR variable named PSWD, and suppress the display, enter
To display the prompt "Enter weekly salary: " and place the reply in a NUMBER variable named SALARY with a default of 000.0, enter
To display the prompt "Enter date hired: " and place the reply in a DATE variable named HIRED with the format "dd/mm/yyyy" and a default of "01/01/2001", enter
To display the prompt "Enter employee lastname: " and place the reply in a CHAR variable named LASTNAME, enter