In a mysql table, if the primary key is id and auto-increment, what will happen when id becomes special?

Source: Internet
Author: User
{Code...} above is the largest data in the database.
403102 graph statistics 0 unileverexpiry/websitearticle/index 403 3 rw y 403103 clip group 0 material/admin/group 403 1 rw n

The above is the largest data in the database.

Reply content:
403102 graph statistics 0 unileverexpiry/websitearticle/index 403 3 rw y 403103 clip group 0 material/admin/group 403 1 rw n

The above is the largest data in the database.

If you use int, its range is
Integer Data from-2 ^ 31 (-2,147,483,648) to 2 ^ 31-1 (2,147,483,647) (All numbers ). The storage size is 4 bytes. It should be enough.

This may indeed cause overflow, but it still depends on whether PHP is 32-bit or 64-bit. However, for MySQL, it can store the range, it is basically not suitable to consider overflow issues.

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.