mercredi 2 décembre 2015

How to get exact two columns of table(s) from a entair database in SQL server

There are two tables - Entity table and Account table. Entity table having EntityID and Account table having AccountID. There is a 3rd table EntityAccountAssociation which contains both EntityID and AccountID. - This I know.

My scenario is; suppose in a product support, I do not know about this 3rd table (and no one is there to tell me) , then, is there any query to find out this 3rd table to get the relationship in a huge database with 100s of table?

For Example: In that query, I will pass these two column name as parameter   and it will show me on which particular table these two columns exists.

Please help and let me know. Thanks.

Aucun commentaire:

Enregistrer un commentaire