title: mysql - How to handle query search with special characters %(percent) and _(underscore)
body: <p>I have 2 records in my database, <b><code>Tom%Jerry</code></b> and <b><code>Ninja_Kids</code></b>. One has a special character %(percent) and the other has _(underscore). I tried the following commands in mysql terminal.</p>
  
  <pre><code>SELECT * FROM CUSTOMER WHERE NAME LIKE '%%%';
  SELECT * FROM CUSTOMER WHERE NAME LIKE '%_%';
  </code></pre>
  
  <p>Both of the commands returned all the records.</p>
  
  <p>How am I gonna make these return the record that has either <code>%</code> or <code>_</code>.</p>
  
  <p>I know that <code>%</code> is used in mysql like a reserved word but what if there are cases that a record contains special characters mentioned above.</p>
  
  <p>BTW, aside from the 2 do you know other special characters that don't behave normal? </p>
  
  <p>Please help. Thanks in advance.</p>