| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Constraints
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
![]() |
![]() |