Re: desc plus; something that shows constraints too?
Date: Mon, 18 Feb 2008 06:33:58 -0800 (PST)
Message-ID: <af581f36-62d0-4350-9ceb-6c110b6dafe9@k2g2000hse.googlegroups.com>
On Feb 18, 3:07 am, Robert Klemme <shortcut..._at_googlemail.com> wrote:
> On Feb 18, 12:15 am, danwal..._at_yahoo.com wrote:
>
> > Rookie here. Is there a sqlplus command, something like desc, that
> > also lists column contraints?
>
> There are different ways depending on what you want to achieve. There
> is PS/SQL package DBMS_METADATA and there are views like
> USER_CONSTRAINTS.
>
> Kind regards
>
> robert
Oracle provides access to pretty much every piece of information about database objects via the rdbms dictionary views. Here is a short article on some of the most useful views:
How do I find information about a database object: table, index, constraint, view, etc... in Oracle ?
http://www.jlcomp.demon.co.uk/faq/object_info.html
To answer your question the following query might be of interest:
select search_condition
from all_constraints
where table_name = 'xxxxx'
and owner = 'yyyy'
and constraint_type = 'C'
HTH -- Mark D Powell -- Received on Mon Feb 18 2008 - 08:33:58 CST