问题
The command prompt doesn't allow me to key in values. How should I solve this problem?

回答1:
The SQL*Plus ACCEPT command accepts values from the user using SQL*Plus formats. To declare something as a CHAR(7) you would use a7
or to declare something as a NUMBER(4,0) you would use 9999
.
SQL> accept stdnum char format 'a7' prompt 'Enter student number: '
Enter student number: abc
SQL> accept year number format '9999' prompt 'Enter year: '
Enter year: 2017
The documentation defines the syntax (I've shortened it slightly) as:
ACCEPT variable [data type] [FORMAT format] [DEFAULT default] [PROMPT text|NOPROMPT] [HIDE]
来源:https://stackoverflow.com/questions/21830701/unable-to-use-accept-command-in-oracle