SQL*Plus User's Guide and Reference Release 8.1.5 A66736-01 |
|
Command Reference, 33 of 52
Sends the specified message or a blank line to the user's screen.
PRO[MPT] [text]
Refer to the following for a description of the term or clause:
You can use this command in command files to give information to the user.
The following example shows the use of PROMPT in conjunction with ACCEPT in a command file called ASKFORDEPT. ASKFORDEPT contains the following SQL*Plus and SQL commands:
PROMPT PROMPT Please enter a valid department PROMPT For example: 10, 20, 30, 40 ACCEPT NEWDEPT NUMBER PROMPT 'DEPT:> ' SELECT DNAME FROM DEPT WHERE DEPTNO = &NEWDEPT
Assume you run the file using START or @:
SQL> @ASKFORDEPT
SQL*Plus displays the following prompts:
Please enter a valid department For example: 10, 20, 30, 40 DEPT:>
You can enter a department number at the prompt DEPT:>. By default, SQL*Plus lists the line containing &NEWDEPT before and after substitution, and then displays the department name corresponding to the number entered at the DEPT:> prompt.
|
Copyright © 1999 Oracle Corporation. All Rights Reserved. |
|