equal
deleted
inserted
replaced
157 |
157 |
158 List tables that has foreign key to given table:: |
158 List tables that has foreign key to given table:: |
159 |
159 |
160 select * from SYS.USER_CONSTRAINTS cons |
160 select * from SYS.USER_CONSTRAINTS cons |
161 join SYS.USER_CONSTRAINTS rcons on rcons.CONSTRAINT_NAME = cons.R_CONSTRAINT_NAME |
161 join SYS.USER_CONSTRAINTS rcons on rcons.CONSTRAINT_NAME = cons.R_CONSTRAINT_NAME |
162 where cons.CONSTRAINT_TYPE = 'R' and rcons.TABLE_NAME 'TBL_NAME'; |
162 where cons.CONSTRAINT_TYPE = 'R' and rcons.TABLE_NAME = 'TBL_NAME'; |
163 |
163 |
164 select * from SYS.USER_CONSTRAINTS cons |
164 select * from SYS.USER_CONSTRAINTS cons |
165 join SYS.USER_CONSTRAINTS rcons on rcons.CONSTRAINT_NAME = cons.R_CONSTRAINT_NAME |
165 join SYS.USER_CONSTRAINTS rcons on rcons.CONSTRAINT_NAME = cons.R_CONSTRAINT_NAME |
166 where cons.CONSTRAINT_TYPE = 'R' and rcons.TABLE_NAME like '%/_OLD' escape '/'; |
166 where cons.CONSTRAINT_TYPE = 'R' and rcons.TABLE_NAME like '%/_OLD' escape '/'; |
167 |
167 |