By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,137 Members | 1,430 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,137 IT Pros & Developers. It's quick & easy.

multiple foreign keys

P: 1

I have the following tables:

ID Title1 Title2
1 2 1

ID Nume
1 A
2 B

Both IDs are PK
Title11, Title2 are FK for TableB'PK
So one line from TableA can refer to multiple lines in TableB

How can i WRITE A jOIN that results in the following:
Join result:
TableA.ID Nume Nume
1 B A

Thank you.
Jun 14 '12 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 10K+
P: 12,427
Join to TableB twice.

However, your data is not normalized. That's why querying is more difficult. You should think about normalizing it.
Jun 14 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.