建表语句对了吗?请看下面的示例:
create table test (user varchar(10),id int AUTO_INCREMENT not null,primary key(id))

解决方案 »

  1.   

    对的,可是id不能自增加。必须要指定id.
      

  2.   

    下面是测试用的:
    1、建表
    create table auto(
    id int auto_increment,
    name varchar(10),
    primary key(id)
    );
    2、加数据
    insert into auto values('qwe');
    就会报ERROR 1136: Column count doesn't match value count at row 1
    请请教!
      

  3.   

    老兄,你插入的SQL语句错了,应该是“insert into auto(name) values('qwe');”,如果你用“insert into auto values('qwe');”进行插入,就会出现提示的错误。
      

  4.   

    谢谢,czb(草中宝)老弟,20给你了!