title: select multiple tables with condition in sql query
body: <p>First Table--
  <strong>Product</strong> Table</p>
  
  <pre><code>P_ID   P_Name    D_Flag
   37    keyboard    N
   38    mouse       N
   39    hardisk     Y
   40    pendrive    Y
   41    printer     Y
   42    CD-DVD      Y
   43    cardreader  Y
  </code></pre>
  
  <p>and the second Table
  <strong>Product_Detail</strong> Table</p>
  
  <pre><code>P_ID  P_ID  P_Prize  P_Company  D_Flag
   11    37    600       Intex     N      
   12    38    200       Enter     N
   13    39    1000      XYZ       N
   14    40    200       SONY      Y
   15    41    5000      LG        Y
  </code></pre>
  
  <p>then the output should like-------->
  <strong>ProductList</strong> Table</p>
  
  <pre><code>P_Name      P_Prize   P_Company 
  hardisk      --        --
  pendrive     200       SONY
  printer      5000      LG
  CD-DVD       --        --
  cardreader   --        --
  </code></pre>
  
  <p><strong>Note</strong>- 
  Therefor table ProductList contains those Product Name(P_Name), Product Prize(P_Prize) and Product Company(P_Company) where Product.D_Flag='Y' and select should those field from Table Product_Detail where Product_Detail.D_Flag='Y'. Otherwise values should be null.</p>