What is the difference between int and int (num) in mysql? Solution

Source: Internet
Author: User
What is the difference between int and int (num) in mysql? For example, what is the difference between int (num) and int? It seems that the display width cannot be limited in actual data insertion. in addition to the addition of the zerofill attribute, the display width must occupy the num bit. there is no difference as an exception, you already know that the tool for generating the num bound to the zerofill attribute has a maximum width. what is the difference between int and int (num) in mysql?
For example, what is the difference between int (num) and int? It seems that the display width cannot be limited in actual data insertion, except that the attribute zerofill must occupy the num bit.

------ Solution --------------------
No difference
As an exception, you already know the num bound to the zerofill attribute.

All generated by tools have a maximum width, which is used to remind you of the maximum number of digits of the value, so that you do not know the overflow
------ Solution --------------------
This is the same as the C-style formatted string. if the limit is exceeded, it is displayed completely.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.