Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL for retrieving Constraints
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