|Lesson 10||The DESCRIBE Command |
|Objective||Server 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 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
SVRMGR> DESCRIBE dba_users
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
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
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
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
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.