title: Why comparing Strings in MySQL query is not working
body: <p>I am running a very simple SELECT query in MySQL and it's not working.</p>
  
  <pre><code>SELECT string_name FROM table_name;
  </code></pre>
  
  <p>This is giving me required output. Like</p>
  
  <ol>
  <li>This is string one.</li>
  <li>This is string two.</li>
  <li>This is string three.</li>
  </ol>
  
  <p>and so on...</p>
  
  <p>But if I am running a query like this </p>
  
  <pre><code>SELECT * FROM table_name WHERE string_name='This is string one'
  </code></pre>
  
  <p>It's not giving any output. I even tried <code>TRIM</code> function.</p>
  
  <pre><code>SELECT * FROM table_name WHERE TRIM(string_name)=TRIM('This is string one')
  </code></pre>
  
  <p>But it's still not giving any output. </p>
  
  <p>Please suggest what I am missing here. Is it because of some formatting or am I doing any silly mistake. By the way, Strings are saved as <code>VARCHAR</code> in the database.</p>