364,085 Members | 5261 Browsing Online
Community for Developers & IT Professionals
Bytes IT Community

ZEROFILL

Khazret Sapenov
P: n/a
Khazret Sapenov
Hi,
What is the practical use of ZEROFILL in your case?

regards,
Khaz


Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


Bill Karwin
P: n/a
Bill Karwin
Khazret Sapenov wrote:[color=blue]
> What is the practical use of ZEROFILL in your case?[/color]

I have not had a need to use that feature in my projects, but sometimes
people have an integer field that must have uniform length, so they
prefer to have the leading portion fill with zeroes.

For instance:
http://groups-beta.google.com/group/...90b6cac8da980/

Regards,
Bill K.
Jul 23 '05 #2

Khazret Sapenov
P: n/a
Khazret Sapenov
Bill,
I have read the link, however it's unclear what is the "specific reason".
Anyway thank you for your time.

regards,
Khazret Sapenov

"Bill Karwin" <bill@karwin.com> wrote in message
news:cub4ol02ksa@enews3.newsguy.com...[color=blue]
> Khazret Sapenov wrote:[color=green]
> > What is the practical use of ZEROFILL in your case?[/color]
>
> I have not had a need to use that feature in my projects, but sometimes
> people have an integer field that must have uniform length, so they
> prefer to have the leading portion fill with zeroes.
>
> For instance:
>[/color]
http://groups-beta.google.com/group/...90b6cac8da980/[color=blue]
>
> Regards,
> Bill K.[/color]


Jul 23 '05 #3

Bill Karwin
P: n/a
Bill Karwin
Khazret Sapenov wrote:[color=blue]
> I have read the link, however it's unclear what is the "specific reason".[/color]

The link just demonstrates that there exists a person who has that
requirement to pad integers with zeroes, and the ZEROFILL attribute was
the solution.

I think it's just a convenience. A programmer could format the value
that way after fetching it from the database, but apparently it's a
common enough task that MySQL can do it for you if you need it.

As for why someone would want this, it can help in some documents to
make integers of uniform length, so that they align with each other
regardless of being right- or left-justified.

Regards,
Bill K.
Jul 23 '05 #4

Post your reply

Help answer this question



Didn't find the answer to your MySQL Database question?

You can also browse similar questions: MySQL Database mysql zerofill zerofill mysql