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: Constraints

Re: Constraints

From: Howard J. Rogers <howardjr2000_at_yahoo.com.au>
Date: Tue, 11 Mar 2003 14:03:12 +1100
Message-Id: <pan.2003.03.11.03.03.12.359745@yahoo.com.au>


On Tue, 11 Mar 2003 00:13:40 +0000, Scott Staub wrote:

> Using the constraint name, how can I determine the table name and field name
> that the constraint is for?
>
> Thank you in advance,
>
> Scott

DBA_CONSTRAINTS will, for a given constraint name, give you the table name involved.

DBA_CONS_COLUMNS will give you the whole shebang. Feed it a constraint name, and it will it tell you the table AND the column involved.

Of course, having named your constraints properly, you could tell all that merely by looking at the constraint name, couldn't you!! (IE, the convention has it you should call you constraints: TABLE_COLUMN_TYPE... eg, EMP_EMPNO_PK. 'Course it gets fascinating how you name the buggers when you have a 12-concatenated-columns Primary Key!!)

Regards
HJR Received on Mon Mar 10 2003 - 21:03:12 CST

Original text of this message

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