title: Why does using an Underscore character in a LIKE filter give me all the results?
body: <p>I wrote the below SQL query with a <code>LIKE</code> condition:</p>
  
  <pre><code>SELECT * FROM Manager
  WHERE managerid LIKE '_%'
  AND managername LIKE '%_%'
  </code></pre>
  
  <p>In the <code>LIKE</code> I want to search for any underscores <strong><code>%_%</code></strong>, but I know that my columns' data has no underscore characters.</p>
  
  <ul>
  <li>Why does the query give me all the records from the table?</li>
  </ul>
  
  <p>Sample data:</p>
  
  <pre><code>create table Manager(
      id int
      ,managerid varchar(3)
      ,managername varchar(50)
      );
  
  insert into Manager(id,managerid,managername)values(1,'A1','Mangesh');
  insert into Manager(id,managerid,managername)values(2,'A2','Sagar');
  insert into Manager(id,managerid,managername)values(3,'C3','Ahmad');
  insert into Manager(id,managerid,managername)values(4,'A4','Mango');
  insert into Manager(id,managerid,managername)values(5,'B5','Sandesh');
  </code></pre>
  
  <p><kbd><a href="http://www.sqlfiddle.com/#!3/27596/1" rel="noreferrer"><strong>Sql-Fiddle</strong></a></kbd></p>