title: How to remove white spaces from columns in SQL Server 2000?
body: <p>I have an old SQL Server 2000 database from which I read data. My problem is every query involving a String returns a value the size of that column filled with blank spaces. </p>
  
  <p>e.g: let's say we have a column called <code>NAME CHAR(20)</code>. All queries would return:</p>
  
  <pre><code>"John                    " 
  </code></pre>
  
  <p>instead of just <code>"John"</code>. </p>
  
  <p>Is there a configuration or parameter in my database that causes this, or anything at all that can be changed to avoid it? Thank you.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I'd like to clarify, I'm reading my DB using JPA Repositories. I don't want to physically remove the whitespaces from the columns, or trim the values manually using RTRIM/LTRIM/REPLACE. I'm just trying to retrieve the column without trailing spaces, without adding any extra strain to the query or trimming the fields programatically.</p>