Bill Karwin wrote:
> howachen@gmail.com wrote:
> > why we need to use in real life?
>
> The only time I have used the display width is when I'm also using the
> ZEROFILL modifier.
>
> CREATE TABLE foo ( i INT(6) ZEROFILL );
> INSERT INTO foo VALUES (42);
> SELECT i FROM foo;
>
> Outputs: 000042
>
> Regards,
> Bill K.
oic, that's mean without using ZEROFILL, it is useless to set the
display width...it was funny that many books/reference/web sites used
display width but in fact they are useless in real life...