|
|
|
DESC[RIBE] (SQL*Plus command)
Describe an Oracle Table, View, Synonym, package or Function.
Note that because this is a SQL*Plus command you don't need to terminate it
with a semicolon.
Syntax:
DESC table DESC table column DESC view DESC view column DESC synonym DESC synonym column DESC package* DESC package.procedure DESC function * some versions of PL/SQL only
It is also possible to describe objects in another schema or via a database
link
e.g.
DESCRIBE user.table@db_link
An alternative to the DESC command is selecting directly from the data dictionary
-
DESC My_Table
is equivalent to
SELECT column_name, nullable, data_type
FROM user_tab_columns
WHERE table_name='MY_TABLE';
The DESCRIBE command allows you to describe objects recursively to the depth
level set in the SET DESCRIBE command.
The description for functions and procedures contains the type of PL/SQL object
(function or procedure) the name of the function or procedure, the type of value
returned (for functions) the argument names, types, whether input or output,
and default values, if any.
DESC user.object_name will always identify a distinct database object because
a user's database objects must have unique names. e.g. you cannot create a FUNCTION
with the same name as a TABLE in the same schema.
You know the great thing about TV? If something important happens anywhere
at all in the world, no matter what time of the day or night, you can always
change the channel. - Jim Ignatowski
Related Commands:
Related Packages:
DBMS_DESCRIBE