SQL* Plus CLI  «Prev 

Using a more Descriptive Prompt

Components of PROMPT in SQL*Plus

  1. PROMPT: Displays a message to the user. May be abbreviated PRO.
  2. message_text: The message that you want the PROMPT command to display.
  3. ACCEPT: Prompts the user for a value, and accepts a response. May be abbreviated to ACC.
  4. variable_name: Is the name of the substitution variable in which you want the user's response to be stored.
  5. [NUMBER|CHAR|DATE]: Allows you to specify a datatype. NUMBER may be abbreviated to NUM.
  6. FORMAT: Introduces a format string that is used to validate the user's input. May be abbreviated to FOR.
  7. format_spec: Is a format string that is used to validate the user's input. This format string is built just like the one used for the COLUMN command.
  8. DEFAULT: Introduces a default value, to be used if the user presses ENTER without responding to the prompt. May be abbreviated DEF
  9. default_value: The value that you want to use as a default response.
  10. PROMPT: Introduces the prompt text.
  11. prompt_text: Is the text that you want SQL*Plus to display as a prompt.
  12. NOPROMPT: Tells SQL*Plus not to display a prompt.
  13. HIDE: Causes SQL*Plus not to echo the user's response back to the display. This is useful when prompting for a password.