[Solved] How to random a zero leading string field mysql [duplicate]


Like @B-and-P describes in his comment. You can do this using LPAD.

UPDATE 
    customer_db
SET
    number = LPAD(FLOOR(number + rand()*1000000),10,0)

LPAD uses 3 parameters; string, total amount of characters and last but not least which character should be used for padding.

1

solved How to random a zero leading string field mysql [duplicate]