title: How to substring a MySQL table column
body: <p>I want to select a field from table and substring it.</p>
  
  <p>For example:</p>
  
  <pre><code>VAN1031 --&gt; 1031
  </code></pre>
  
  <p>I tried this, but is improper syntax:</p>
  
  <pre><code>SELECT SUBSTR(R.regnumber,3,3) from registration R
  </code></pre>
  
  <p>How can this be done?</p>