SQL*Plus
ACCEPT
ACCEPT
ACCEPT tspace CHAR PROMPT 'Enter Tablespace '
Use &tspace or &&tspace to reference this variable in your SQLData type can be CHAR, NUMBER or DATEYou can specify a FORMAT. Entries that don't match the FORMAT spec will be rejected.You can specify a DEFAULT which will take effect if the user presses Enter without entering any other characters.You can HIDE the user's response (useful for passwords).If you specify NOMPROMPT instead of PROMPT then no prompt will be shown (useful if you have already prompted using standalone PROMPT commands.BREAK
BREAK
BREAK ON tablespace SKIP 1
COMPUTE
COMPUTE
COMPUTE SUM LABEL 'total_mb' OF size_mb ON tablespace
COLUMN
COLUMN
COLUMN querycol FORMAT a30
PROMPT
PROMPT
PROMPT
PROMPT The line above shows a blank line. This line shows this text
PROMPT The next line shows the current value of the tspace variable
PROMPT &tspace
SET
SET
TODO
SET VERIFY OFF
SET HEADING OFF
SET PAGESIZE 99
SET LINESIZE 99
SET FEEDBACK OFF
SET TRIMSPOOL ON
SET SERVEROUTPUT ON
Bibliography
Bibliography
https://blogs.oracle.com/opal/sqlplus-101-substitution-variables https://docs.oracle.com/cd/B19306_01/server.102/b14357/ch12014.htm (COMPUTE)https://docs.oracle.com/cd/B19306_01/server.102/b14357/ch12013.htm (COLUMN)https://www.oreilly.com/library/view/oracle-sqlplus-the/1565925785/ch04s03.html
SEThttps://stackoverflow.com/questions/5340716/suppress-output-of-variables-substitution-in-sqlplus
Defaultshttps://www.funoracleapps.com/2020/11/sqlplus-prompt-with-gloginsql-and.html
SEThttps://stackoverflow.com/questions/5340716/suppress-output-of-variables-substitution-in-sqlplus
Defaultshttps://www.funoracleapps.com/2020/11/sqlplus-prompt-with-gloginsql-and.html