RelationalDBDesign 




DB Creation   «Prev  Next»
Lesson 10The DESCRIBE Command
ObjectiveServer Manager's DESCRIBE command to show structure

Viewing a list of columns

Use Server Manager's DESCRIBE command to show the structure of a table.
A very useful Server Manager command is the DESCRIBE command.
DESCRIBE is usually used to view a list of columns in a database table or view.
The following example shows how it would be used to list the column definitions for the DBA_USERS view.
SVRMGR> DESCRIBE dba_users
The DBA_USERS view is a data dictionary view that returns information about the users who can log in to an Oracle database.

Viewing function, procedure, and package headers

The DESCRIBE command can also be used to view function, procedure, and package headers.
The following command for example, would tell you about all the entry points in the UTL_FILE package, which is used to read and write files from within stored procedures.
SVRMGR> DESCRIBE utl_file


You can also retrieve the entire command that can be used to recreate the table:
select dbms_metadata.get_ddl('TABLE','< my table name>','<table owner>') from dual;

Viewing more specific information

You can also retrieve information on a specific procedure or function in a package. Just name the procedure or function as a parameter to the DESCRIBE command.
A period is used to separate the specific procedure or function name from the package name, as shown in the following example:
SVRMGR> DESCRIBE utl_file.fflush
Go ahead and try these these commands yourself, using the simulation below.
Ora Describe Command
Task icon
Now that you have seen a simulation of how the DESCRIBE command can work, those of you who are running Oracle8 on your machines should connect to your database using Server Manager, and try out this command for yourselves.