title: Sql Inner join query on condition when specific value
body: <p>I have following query:</p>
  
  <pre><code>SELECT Art.Id, Art.Nummer, Art.Serie, Art.EANBarcode, Art.Preis, Art.Volumen, Art.Vater, Art.Name, Art.Amazon, Kat.Name, Subkat.Name, Subsubkat.Name FROM
  tbArtikel As Art 
  INNER JOIN tbKategorie As Kat ON Art.FK_Kategorie_ID=Kat.Id
  INNER JOIN tbSubkategorie As Subkat ON Art.FK_SubKategorie_ID=Subkat.Id
  INNER JOIN tbSubsubkategorie As Subsubkat ON Art.FK_SubSubKategorie_ID=Subsubkat.Id
  WHERE RIGHT(Art.Nummer,2)='.1'
  </code></pre>
  
  <p>The situation is that Art.FK_SubSubKategorie_ID can be null (developers did that setting 0 instead of null) - knows that bad habit but how it is. However i want to make if there is really 0 for Art.FK_SubSubKategorie_ID i want to take that record and for Subsubkat.Name just put empty string. Hope got my point.</p>
  
  <p><strong>Additional question if possible(PS):</strong>
  Is there any diffrence in where condition if i do:</p>
  
  <pre><code>WHERE RIGHT(Art.Nummer,2)='.1'
  WHERE Art.Nummer LIKE '%.1'
  </code></pre>
  
  <p>or even:</p>
  
  <pre><code>WHERE NOT RIGHT(Art.Nummer,2)='.1'
  WHERE Art.Nummer NOT LIKE '%.1'
  </code></pre>
  
  <p>I know that like working with indexes, but i am just talking about whether in this case both will work and search exactly the same? I am using that to get specific articles.</p>