title: Get results of people that are in A but not B and vise versa [SQL Server]
body: <p>I have to get a list of people that have only col1 subscription or only have col2 subscription, from table1. Table2 is used for referencing. I have the query that finds each separately, but how would I put the output in one?</p>
  
  <p>Note: Table2 has many more columns, but for the sake of simplicity I haven't added them in here. I need to get all the details from table2. </p>
  
  <pre><code>--This will get people that have col1 and not col2
  select *
  from table2 
  inner join table1 on col1 = table2.col1
  where table2.col1 not in (select col2 from table1)
  
  --This will get people that have col2 and not col1
  select *
  from table2 
  inner join table1 on col1 = table2.col1
  where table2.col1 in (select col2 from table1)
  </code></pre>
  
  <p>So how would I join the results of these 2 queries into one? Without union. Because I need the output table to have col1 and col2 and if one is present the other should be null.</p>
  
  <pre><code>|                  Table1                |
  |---------------------|------------------|
  |      Col1           |     Col2         |
  |---------------------|------------------|
  |          A          |         F        |
  |---------------------|------------------|
  |          B          |         G        |
  |---------------------|------------------|
  |          C          |         H        |
  |---------------------|------------------|
  |          D          |         I        |
  |---------------------|------------------|
  |          E          |         J        |
  |---------------------|------------------|
  
  
  
  |        Table2       |
  |---------------------|
  |      Col1           |
  |---------------------|
  |          A          |   
  |---------------------|
  |          B          |
  |---------------------|
  |          C          |         
  |---------------------|
  |          D          |
  |---------------------|
  |          E          |
  |---------------------|
  |          F          |   
  |---------------------|
  |          G          |
  |---------------------|
  |          H          |         
  |---------------------|
  |          I          |
  |---------------------|
  |          J          |
  |---------------------|
  </code></pre>