MySQL primary key self-growth and set default value

Source: Internet
Author: User
CREATE TABLE ' ecm_address ' (' addr_id ' int (ten) unsigned NOT null auto_increment, ' user_id ' int (ten) unsigned NOT NULL Defau  LT ' 0 ', ' consignee ' varchar ($) NOT null default ' ', ' region_id ' int (ten) unsigned DEFAULT NULL, ' region_name ' varchar (255) Default NULL, ' address ' varchar (255) default NULL, ' zipcode ' varchar ' default ' null ', ' phone_tel ' varchar ' default NU ' LL, ' phone_mob ' varchar DEFAULT NULL, PRIMARY key (' addr_id '), key ' user_id ' (' user_id ')) Engine=myisam auto_increment =2 DEFAULT Charset=utf8 You notice the MySQL statement that created the table, in the last line there is a: auto_increment=2, this indicates that after the table is built, autogrow is starting from 2, if = 10, then starting from 10. Understand, useful words, please give points, thank you!

MySQL primary key self-growth and set default value

Related Article

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.