See the ZEROFILL column attribute:
http://www.mysql.com/doc/en/Column_types.html
http://www.mysql.com/doc/en/Numeric_types.html
If necessary, you can use an ALTER TABLE command to add that
attribute to the appropriate columns.
- steve
At 10:11 AM -0700 10/11/02, Bry
At 10:11 -0700 10/11/02, Bryan Koschmann - GKT wrote:
>Hi,
>
>Does MySQL provide for any way to "pad" a field? I have accounts numbers
>that vary from 3-5 digits, and would like them 8 digits padded by zeros
>(479 becomes 0479, 17234 becomes 00017234, etc). I know I could
>probably write a scr
Hi,
Does MySQL provide for any way to "pad" a field? I have accounts numbers
that vary from 3-5 digits, and would like them 8 digits padded by zeros
(479 becomes 0479, 17234 becomes 00017234, etc). I know I could
probably write a script to fix that before entering the data into the
database,