Return to Snippet

Revision: 42094
at February 27, 2011 04:26 by uberdragon


Initial Code
ALTER TABLE `table` CHANGE `zip` `zip` CHAR(5); #changes type
UPDATE table SET `zip`=LPAD(`zip`, 5, '0'); #pads everything

Initial URL

                                

Initial Description

                                

Initial Title
Pad zipcode field to ensure full 5 digit zipcodes are maintained

Initial Tags

                                

Initial Language
MySQL