MySQL-设置自增

错误1:rem

create table employee(table

    id int(10) not null auto_increment=10000001,im

    name varchar(50) not null,tab

    age int(3) not null,错误

    primary key (id)ab

);arc

错误2:

create table employee(

    id int(10) not null auto_increment(10000001, 1),

    name varchar(50) not null,

    age int(3) not null,

    primary key (id)

);

 

正确1:

create table employee(

    id int(10) not null auto_increment,

    name varchar(50) not null,

    age int(3) not null,

    primary key (id)

)auto_increment=10000001;

正确2:

create table employee(

    id int(10) not null auto_increment,

    name varchar(50) not null,

    age int(3) not null,

    primary key (id)

);

alter table employee auto_increment=10000001;

相关文章
相关标签/搜索