Jump to content

Recommended Posts

No. The (4) is just a display length. If there are less than 4 digits stored, and you are using zerofill, the number would be padded with zeros to four digits. You'll still be able to store a max unsigned value of 4,294,967,295.

i'm not using zerofill, my field is unsigned.

 

plase correct me if I'm wrong:

 

value: 156

field: int(4) unsigned zerofill > value becomes 0000156

field: int(4) unsigned > value is 156

 

field: smallint(1) unsigned zerofill > value becomes 0156

field: smallint(1) unsigned > value is 156

 

Right?

 

 

 

 

It depends on the field type. Some require it, where others don't. Your best bet would to look at the manual for the field types, but if you omit one that's required, you should get an error returned to that effect.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.