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: How can I know what constraints are ?

Re: How can I know what constraints are ?

From: <chajec_at_nspr.com>
Date: Fri, 08 May 1998 19:36:42 GMT
Message-ID: <6ivmsb$oe4$1@nnrp1.dejanews.com>


In article <355172FF.60332BB1_at_lgtel.co.kr>,   ktlim_at_lgtel.co.kr wrote:
>
> Jordi Bellver wrote:
>
> > Hi !
> >
> > I'ld like to know what ar the constraints declared for a table (or all
> >
> > tables) and the status (enable/disable) of all them.
> >
> > What must I do ?
> >
> > Thanks in advance !
> >
> > (sorry for my poor level of english)
>
> hi!
> check USER_CONSTRAINTS, USER_CONS_COLUMNS views.
> that is oracle dictionary view.
>
> bye.
>
>

Try the following to print a list of constraints on tables.

SET LINESIZE 132
SPOOL LISTCONS.OUT
select table_name,constraint_name,constraint_type, search_condition,status
from all_constraints
WHERE OWNER = 'TESTDB'
ORDER BY 1,2
/
SPOOL OFF -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Fri May 08 1998 - 14:36:42 CDT

Original text of this message

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