title: How to search for slash (\) in MySQL? and why escaping (\) not required for where (=) but for Like is required?
body: <p>Consider this QUERY (<a href="http://sqlfiddle.com/#!2/b7284/1">DEMO IS HERE</a>)</p>
  
  <pre><code>(SELECT * FROM `titles` where title = 'test\\')
  UNION ALL
  (SELECT * FROM `titles` where title LIKE 'test\\\\')
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>| ID | TITLE |
  --------------
  |  1 | test\ |
  |  1 | test\ |
  </code></pre>
  
  <h2>QUESTION:</h2>
  
  <p>Why no extra <strong>(\)</strong> required for <strong>(=)</strong> but for (like) additional <strong>\\</strong> is required?
  Its clear that MySQL escaped the <strong>(test\)</strong> with <strong>(test\\)</strong> then using <strong>(test\\\\)</strong> is logical for LIKE.</p>
  
  <p>Table information:</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `titles` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
  
  --
  -- Dumping data for table `titles`
  --
  
  INSERT INTO `titles` (`id`, `title`) VALUES
  (1, 'test\\');
  </code></pre>