Constraint name contains table name or not.
any one give me reply on this.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Jun 15, 2013, 4:39 AM EDT
Pulagara Murali40 reputationPosted Jun 24, 2013, 11:10 PM EDT
Thanks for giving response. My actual query is, earlier in my company we have given Foreign key names without following naming conventions. But foreign key preceded with FK_somename. Now we following FK_TBNAMNE_RTB. I need a query on Foreign key which foreign key doesn't having table name.
We are following naming convention is :
FK_TBNAME_RTB
TBNAME : TABLE NAME
RTB : REFERENCE TABLE NAME
can you give me query for list of foreign keys which are not following above structure.
Thanks and Regards,
Murali P.
VulpesRank #55 · 29.2K reputationPosted Jun 25, 2013, 3:18 PM EDT
SELECT * FROM DBA_CONSTRAINTS WHERE CONSTRAINT_TYPE = 'R' AND CONTAINS(CONSTRAINT_NAME, TABLE_NAME) > 0
VulpesRank #55 · 29.2K reputationPosted Jun 26, 2013, 1:23 AM EDT