question

Bright_Hanson avatar image
Bright_Hanson asked

Relationship between two different with never same data. Is possible to have a relationship between these two coulmns/table

Creating a relationship in SQL.

Suppose I have two tables. One is called Sender's Table and the other is called Recipient's Table. They both contain First Name, Last Name Address, telephone #
Can I create a relationship between first name, last name, telephone, Address in Sender's Table and address in recipient table?

sql-server-2014
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
erlokeshsharma08 avatar image
erlokeshsharma08 answered

Hi

I think the question is little vague.

What is the main purpose of establishing the relationship please?

Having said that I assume you want to capture the data of the senders and recipients based on sending item like:-

A sends email to B
B sends email to C
A sends email to D.

Then you can create a third table using everyone's telephone number.

Assuming A is 111, B is 222, C is 333 and D is 444

then the third table would like following

sender recipient

111 222
222 333
111 444

Thanks
Lokesh

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.