create table table_name ( id int auto_increment primary key not null );想给分的话,点击管理,输入密码,给回帖人分,然后结贴,就行了

解决方案 »

  1.   

    如果你已经建立了该表,你可以这么做
    mysql>alter table table_name id int(10) not null auto_increment primary key;
    如果你还没有建立该表,可以这样做
    create table table_anem 
               (id int(10) not null auto_increment primary key
                name varchar(20)
                );
    或者
    create table table_name
                (id int(10) not null auto_increment,
                 name varchar(20),
                 PRIMARY KEY (id)
                 );祝你好运!