title: Adding a padding 0 to a SQL column
body: <p>With SQL Server 2014, I have a nvarchar(10) column with values like this</p>
  
  <pre><code>9998
  03345
  05567
  6675
  </code></pre>
  
  <p>I need to add a left padded "0" to all the cells that are 4 digits long so that all values are 5 digits.</p>
  
  <p>How do I write an update that will take into account the width of the current value?</p>
  
  <pre><code>update MyTable set MyField= RIGHT('00000' + ?????, 5)
  </code></pre>