Created
October 25, 2012 01:34
-
-
Save andreia/3949980 to your computer and use it in GitHub Desktop.
Oracle: Foreign constraints
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select f.constraint_name, f.table_name tabela_filha, p.table_name tabela_pai | |
| from user_constraints f, user_constraints p | |
| where f.constraint_type = 'R' | |
| and f.r_constraint_name = p.constraint_name | |
| -- constraint_type (http://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_1037.htm): | |
| -- R -> Referential (FK) | |
| -- C -> Check constraint on a table | |
| -- P -> Primary Key | |
| -- U -> Unique Key | |
| -- V -> With check option, on a view | |
| -- O -> With read only, on a view |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment