title: adding flag for common rows between two tables
body: <p>i have two tables say A and B. B is a subset of A. what i want to do is this : Add a flag column to table A(only for viewing, not permanently in the table) and the value of this flag should be yes for common rows between A and B and no for non common rows. For ex:</p>
  
  <pre><code>A table
  Column1 Column2 Column3
  X1      X2      X3
  Y1      Y2      Y3
  Z1      Z2      Z3
  </code></pre>
  
  <hr>
  
  <pre><code>select * from A where column1=Y1; to get B
  </code></pre>
  
  <p>now my final output should be </p>
  
  <pre><code>Column1 Column2 Column3 FLAG
  X1      X2      X3      NO   
  Y1      Y2      Y3      YES 
  Z1      Z2      Z3      NO
  </code></pre>
  
  <hr>
  
  <p>i have to everything below the code block in 1 sql statement(extracting B and adding flag). 
  i am just able to extract B. unable to add flag</p>
  
  <p>Using oracle 11.2.0.2.0,sqlplus</p>