| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Paul DuBois | Date: | October 12 2002 1:48am |
| Subject: | Re: padding field with zeros | ||
| View as plain text | |||
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 00000479, 17234 becomes 00017234, etc). I know I could >probably write a script to fix that before entering the data into the >database, but I just wanted to know. Or maybe there is a way to pad it >while doing the query select? INT(8) ZEROFILL, perhaps? > >Thanks, > > Bryan
| Thread | ||
|---|---|---|
| • padding field with zeros | Bryan Koschmann - GKT | 11 Oct |
| • Re: padding field with zeros | Steve Edberg | 12 Oct |
| • Re: padding field with zeros | Paul DuBois | 12 Oct |
