-
I know hot to disabled and enabled constraints.
How do I check for constraints for any given tables?
is there somekind of querry that I can run, to find out?
thank you,
-
If you are a dba then you can use the dba_constraints, if you are a user then you can use the user_constraints to view all the constrains under your schema.
SELECT * FROM dba_constraints;
or
SELECT * FROM user_constraints;
Good luck,
Sam
[Edited by sambavan on 03-19-2001 at 03:33 PM]
Thanx
Sam
Life is a journey, not a destination!
-
query user_constraints table to see STATUS column for
particular constraint.
e.g.
select constraint_name,status from user_constraints
where table_name = 'TABLE1';
-
No question is a dumb question.
There is a table called dba_constraints that keeps up with what constraints are on which tables. The main columns you will want to look at are probably owner, constraint_name, constraint_type (P is PK, U is UK, R is FK, C is Check), table_name, r_owner (referencing owner), r_constraint_name (referencing constraint).
select owner, constraint_name, constraint_type
from dba_constraints
/
Jeff Hunter
-
If you do not have access to DBA_CONSTRAINTS, you might be better off using the ALL_CONSTRAINTS view, rather than USER_CONSTRAINTS.
ALL_CONSTRAINTS gives all the constraints that you have the privileges to see, whereas USER_CONSTRAINTS only has the constraints that you own.
HTH
David.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|