本帖最后由 maotuanerqiu 于 2014-05-02 12:03:50 编辑

解决方案 »

  1.   

    这个时候必须要加上: (col1,col2,col3...)也就是
    set identity_insert 表 oninsert into 表(col1,col2,col3...)
    values(...)
      

  2.   


    就是要用set identity_insert 表 on的话必须加上列表是吗?我试试哈!
      

  3.   


    就是要用set identity_insert 表 on的话必须加上列表是吗?我试试哈!呵呵,对的
      

  4.   

    添加一条记录 INSERT INTO tableName(col1,col2,col3) VALUES (1,2,3) 
    添加多条记录 INSERT INTO tableName(col1,col2,col3) SELECT 3,4,5以上2种方式都可行的。
      

  5.   

    感谢两位!@fengqingtao2008 @yupeigu