Example 2-6 Using the 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 NOT NULL NUMBER(2) DNAME CHAR(14) LOC CHAR(13)
Note: DESCRIBE accesses information in the Oracle data dictionary. You can also use SQL SELECT commands to access this and other information in the database. See your Oracle7 Server SQL Language Reference Manual for details.
Example 2-7 Using the 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
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. Refer to SET
for details.
Example 2-8 Interpreting 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 Object 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:
of this Guide for a SQL*Plus command, in the Oracle7 Server SQL Language Reference Manual for a SQL command, or in the PL/SQL User's Guide and Reference for a PL/SQL block. Otherwise, contact your DBA.