Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL for retrieving Constraints

Re: SQL for retrieving Constraints

From: Klaus Zeuch <Klaus.Zeuch_at_erls04.siemens.de>
Date: 2000/05/15
Message-ID: <8fonbv$p4v$1@papyrus.erlm.siemens.de>#1/1

Hi,

look for Oracle's data-dictionary views

user_tables
user_tab_columns
user_constraints
user_triggers

or
dba_tables
dba_....

There's allways a column table_name -> select column_name, data_type, data_length, data_precision, data_default ..... from user_tab_columns where lower(table_name) = 'mytable'; -- and so on

For quick info try
select * from dict where table_name like 'USER%'

Hth

Klaus
<code_1_at_my-deja.com> schrieb in im Newsbeitrag: 8fi0td$6g$1_at_nnrp1.deja.com...
> I am using Oracle for Windows 95 (Release 7.3.4),
> SQL Plus 3.3 and a test database. I would like to
> get table definitions and constraints using SQL.
> I tried the sp_helpconstraint system stored
> procedure, but it doesn't work. It is not
> recognized as valid. I would like to get the data
> types, constraints, defaults, rules, and triggers
> of any table, using SQL.
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Mon May 15 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US