title: SQL query to compare 2 tables and output a case statement
body: <p>I am trying to write a query that outputs 'Y' if the cust_no is in both tables, else outputs 'N'.</p>
  
  <pre><code>Tab_1:
  123
  456
  789
  
  Tab_2:
  123
  456
  896
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>123   Y
  456   Y
  789   N
  </code></pre>
  
  <p>I understand case statement is needed for this criterion, not sure how does the selection happen. Any heads up would be appreciated.</p>