title: Oracle SQL: NVL Function
body: <p>If Value does not exist in Table B, replace value with null-</p>
  
  <p><strong>Table A Employees</strong>      </p>
  
  <pre><code>ID,NAME
  1,Sam               
  2,Jon
  3,Nick 
  </code></pre>
  
  <p><strong>Table B Sallery</strong></p>
  
  <pre><code>ID,Sallery
  1,500
  2,1000
  </code></pre>
  
  <p><strong>Desired results:</strong></p>
  
  <pre><code>NAME,Sallery
  Sam,500
  Jon,1000
  Nick,
  </code></pre>
  
  <p><strong>What I got so far:</strong></p>
  
  <pre><code> Select A.NAME, 
          NVL(Select Sum(B.Amount) from Sallery B where B.ID=A.ID  ,null)
   From Employees A
  </code></pre>
  
  <p>I want to avoid useing the "Case When exists" expression</p>
  
  <p>Thank you</p>