I have an issue with composite primary keys. Having the name of a table, I need to know which columns are foreign keys and I need to know the names of the tables they relate to. Now this would be easy if it weren't for the fact that the related table have a composite primary key.
sample:
Table Fruits
[pk] FruitId
[pk] OwnerId
Name
Table Desserts
[pk] DessertId
Name
[fk] FruitId
[fk] OwnerId
Given the above, I need to query sql "Give me a list of columns in table Desserts that have a fk relationship and tell me the name of the table and column it relates to.
Thanks for any help provided!