这就是基础不好的悲剧

解决方案 »

  1.   

    在数据库里面点击主键 里面有自动增加的属性 设置为是就可以了  和sql语句没关系
      

  2.   

    这是在数据库里面设置的好不.给你一个小例子
    use master
    go
    if exists(select * from sysdatabases where name='db_test')
     drop database db_test
    go
    use db_test
    go
    if exists(select * from sysobjects where name='tb_table')
     drop table tb_table
    go
    create table tb_table(
     uid int primary key identity(1,1),--自增长
     uname varchar(20) not null,
     upwd varchar(20)
    )