Pad an Integer with 0 mid string I have a table with a column that stores ID values (integers) that require a padding with 0s (zeroes) in the middle. I can pad left or right but, how do I pad in the middle?

For example:


4001 = 40001
4123 = 40123
4000 = 40000


So, any number 4XXX becomes 40XXX.

Comment interactions

Question:


  To clarify, once the values of the relevant column get the padding, are they meant to: 
  
  
  be stored permanently or 
  to be temporarily computed only (e.g., the padding serves display purposes only)?
  


Response:

They should be stored permanently.
If they are indeed INTEGERs, it should be simply

UPDATE 
  yourtable 
SET yourcolumn = 
    FLOOR(yourcolumn/1000) * 10000 + MOD(yourcolumn, 1000)