Share via

suitable connection method

ll1-2690 80 Reputation points
2023-05-24T02:26:12.9266667+00:00

Hello.

I need to consolidate the company's employees. I now have three tables, each with a unique EmpID, through which I want to concatenate the three tables.

tableA contains basic information about individuals, names, etc.

tableB contains contact information, etc., and some are empty.

tableC contains simple family relationships, some are empty.

Please recommend a suitable connection method.

Thanks in advance.

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories


Answer accepted by question author

Anonymous
2023-05-24T02:29:36.8566667+00:00

Hi @ll1-2690

According to your description, you can use the left outer join, like this.

select * from tableA as A left outer join tableB as B on A.EmpID = B.EmpID
	                      left outer join tableC as C on A.EmpID = C.EmpID;

Best regards,

Percy Tang


If the answer is the right solution, please click "Accept Answer". If you have extra questions about this answer, please click "Comment".

Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.