title: One select on two tables with NULL and not null
body: <p>I try to get select from two tables and put some data from one to other with ussing WHERE 
  (PL/SQL)</p>
  
  <p>I have two tables like those:</p>
  
  <p>table1</p>
  
  <pre><code>ID  NAME  COLOR  COMPANY_SHORT_NR
  1   a     Green  1
  2   b     Red    23
  3   c     Blue   null
  4   a     Green  null
  5   g     Green  1
  </code></pre>
  
  <p>table2</p>
  
  <pre><code>ID  SHORT COMP_NAME
  1   1     company_name_1 
  2   23    comapny_name_2
  </code></pre>
  
  <p>and now I would like to get all data from table 1 with companies names and if its null get info it is null like that </p>
  
  <pre><code>1   a     Green  company_name_1 
  2   b     Red    comapny_name_2 
  3   c     Blue   null
  4   a     Green  null
  5   g     Green  company_name_1 
  </code></pre>
  
  <p>I tried do it like this:</p>
  
  <pre><code>select ID
        ,NAME
        ,COLOR
        ,COMPANY_SHORT_NR
  from table1
      ,table2
  where COMPANY_SHORT_NR = SHORT 
  </code></pre>
  
  <p>but this give me only not null values:</p>
  
  <pre><code>1   a     Green  company_name_1 
  2   b     Red    comapny_name_2 
  5   g     Green  company_name_1 
  </code></pre>
  
  <p>if i use sth like this:</p>
  
  <pre><code>select ID
        ,NAME
        ,COLOR
        ,COMPANY_SHORT_NR
  from table1
      ,table2
  where COMPANY_SHORT_NR = SHORT or COMPANY_SHORT_NR is null
  </code></pre>
  
  <p>I get thousends of records ... 
  If I use only <code>IS NULL</code> than it returns me only 2 rows as it should be. </p>
  
  <p>Where I make mistake ? </p>