| SQL*Plus
User's Guide and Reference Release 8.1.6 A75664-01 | 
 | 
Learning SQL*Plus Basics, 4 of 4
While you use SQL*Plus, you may find that you need to list
column definitions for a table, or start and stop the display that scrolls
by. You may also need to interpret error messages you receive when you
enter a command incorrectly or when there is a problem with Oracle or SQL*Plus.
The following sections describe how to get help for those situations.
To see the definitions of each column in a given table, use
the SQL*Plus DESCRIBE command.
To list the column definitions of the three columns in the sample table DEPT, enter
SQL> DESCRIBE DEPT
The following output results:
Name Null? Type ------------------------------- ------- ------------- DEPTNO NUMBER(2) DNAME VARCHAR2(14) LOC VARCHAR2(13)
To see the definition of a function or procedure, use the
SQL*Plus DESCRIBE command.
To list the definition of a function called AFUNC, enter
SQL> DESCRIBE afunc
The following output results:
FUNCTION afunc RETURNS NUMBER Argument Name Type In/Out Default? --------------- -------- -------- --------- F1 CHAR IN F2 NUMBER IN
Suppose that you wish to stop and examine the contents of
the screen while displaying a long report or the definition of a table
with many columns. Press [Pause]. (Refer to Table
2-1 to see how [Pause] is labelled on your keyboard.) The display will
pause while you examine it. To continue, press [Resume].
If you wish, you can use the PAUSE variable of the SQL*Plus
SET command to have SQL*Plus pause after displaying each screen of a query
or report. For more information, refer to the SET
command in Chapter 8.
If SQL*Plus detects an error in a command, it will try to
help you out by displaying an error message.
For example, if you misspell the name of a table while entering a command, an error message will tell you that the table or view does not exist:
SQL> DESCRIBE DPT ERROR: ORA-04043: object DPT does not exist
You will often be able to figure out how to correct the problem from the message alone. If you need further explanation, take one of the following steps to determine the cause of the problem and how to correct it:
 
 
 
| 
 |   Copyright © 1999 Oracle Corporation. All Rights Reserved. | 
 |