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

multiple foreign keys

P: 1
Hi,

I have the following tables:

TableA
ID Title1 Title2
1 2 1

TableB
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


Rabbit
Expert Mod 10K+
P: 12,359
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.