Mysql 能否默认一个整数后让它自动增加呢?比如:定义这个字段
`id` int(11) unsigned NOT NULL auto_increment能否让id 默认为10000 ,然后再从10000 自动递增 10001 10002 .... 呢?

解决方案 »

  1.   

    ALTER TABLE tbl AUTO_INCREMENT = 10000
    or
    set auto_increment_increment = 10000
      

  2.   

    在定义的时候,我这样写 'id' int(11) unsigned not null auto_increment=1000, 但出现错误,正确的写法应该是怎么呢?
      

  3.   

    create table table_name('id' int(11) unsigned not null auto_increment,..........)
    ALTER TABLE table_name AUTO_INCREMENT = 10000;
    如上即可
      

  4.   


    create table table_name(
    'id' int(11) unsigned not null auto_increment,
    ..........
    )
    AUTO_INCREMENT = 10000;