Example consider two tables Persons and Employee

Persons table sample:

1. john,new York
2. Diana,new jersey

Employee table sample:

Employee ID,Team
1. 123,developer
2. 568,tester

Required join Table output should be like

Name,Address,Employee ID,Team
 1.john,new York,null,null
 2.Diana,new jersey,null,null

I want above sample as output is there any way to solve this issue.

closed as unclear what you're asking by mustaccio, John aka hot2use, LowlyDBA, MDCCL, Colin 't Hart Apr 12 at 21:48

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    You may want to explain the logic behind the expected output, because it's not very clear. Please take a look at this advice – mustaccio Mar 1 at 14:08

This can work for you:

FROM Persons a
LEFT JOIN Employee b ON 1=2
FROM Persons a
RIGHT JOIN Employee b ON 1=2;

Not the answer you're looking for? Browse other questions tagged or ask your own question.