Common Sql*plus commands and environment variables
----------------------------------
query table Structure Command: describe (abbreviated DESC)
Set Display output width: Set line [size] {80|n}
List the statements for the SQL buffers: list (abbreviation L) after locating the error statement and modifying it, and then executing the correct statement/or run.
Delete command: Del
Change command: C/original/new body
Generate script: The Save command will deposit the contents of the SQL buffer into the specified file. You can use the GET command to load the contents of a script file into an SQL buffer, use the edit command to edit the script file, and execute the SQL buffer script with the @ or start command.
Spool command: Saves SQL statements and query results to the specified file or output to the printer, spool off | Out
-------------------------------------------------------------------------------------------
Setting environment variables for Sql*plus
You can use the show command to display the configuration of the Sql*plus environment variable, and you can set the environment variable using the value of the SET environment variable variable.
Common environment variables:
Set heading On|off: Whether column headings are displayed in the report
Set Linesize 80|n: Sets the number of characters per line
Set pagesize 24|n: Sets the number of rows to display per page
Set echo On|off
Set Feedback On|off
Set Long 80|n: Sets the maximum byte width for displaying long,clob and Ncolb values.
Format command: Column name format 999999 (representing six-digit number) |A9 (represents 9-character width)
Oracle Self-Study notes (ii)