title: LPADing for JOINS
body: <p>I want to join 2 tables A and B on their ID. Table A's ID has 12 digits while Table B's ID can be from 0 to 12 digits. I tried using LPAD but its taking too long and I am not sure whether it will work. Any advice?</p>
  
  <pre><code>SELECT*
  
  FROM table a
  LEFT JOIN table b
  ON a.ID = LPAD(b.ID,12,'0')
  </code></pre>