title: Microsoft SQL 'not like' vs <>
body: <p>Is there any real difference between using 'not like' without any % signs and using the not-equal operator &lt;> in Microsoft SQL? Example:</p>
  
  <pre><code>if exists (select * from table_name where column_name not like @myvariable)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>if exists (select * from table_name where column_name not like 'myvalue')
  </code></pre>
  
  <p>versus</p>
  
  <pre><code>if exists (select * from table_name where column_name &lt;&gt; @myvariable)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>if exists (select * from table_name where column_name &lt;&gt; 'myvalue')
  </code></pre>
  
  <p>I've noticed I have a habit of using not like (it's faster to type and feels more intuitive when reading my own code) and I was wondering if there's any chance that it will ever cause behavior that is different from a not-equal. I read in other questions that 'like' is slower than 'equals' but I'm more concerned about the result of the comparison here.
  I am nearly always using the varchar data type when doing comparisons. </p>