Zerofill use benefit in MySQL

Mahabubur Rahman
1

With Zerofill when you select a column, it pads the displayed value with zeros up to the field size specified in the column definition. It does not affect the values longer than the display width.  Note that usage of ZEROFILL also implies UNSIGNED.

ZEROFILL affects only how it is displayed. Its use and the display have no effect on how the data is stored. 

The bellow example demonstrates the use of ZEROFILL:





Result :
    
codeprice
0000001010
0000001212
00000123123
123456789500





Post a Comment

1Comments
Post a Comment