就是insert into tabale1 select * from table2 where ......

解决方案 »

  1.   

    insert into 表1
    select * 
    from 表2
    where 会员ID not in (select 会员ID from 表1)
      

  2.   

    insert into 表1
    select * 
    from 表2
    where 会员ID not in (select 会员ID from 表1)
      
      

  3.   

    指定字段列表,如:
    insert into 表1 (字段1,...)
    select 字段1,...
    from 表2
    where 会员ID not in (select 会员ID from 表1)
      

  4.   

    还是不可以服务器: 消息 8101,级别 16,状态 1,行 1
    仅当使用了列的列表,并且 IDENTITY_INSERT 为 ON 时,才能在表 'info_sell' 中为标识列指定显式值。
      

  5.   

    先查一条记录了解要插入表的信息,将自增列不列在插入语句的列列表中,或加一句
    set IDENTITY_INSERT ON 插入完后set IDENTITY_INSERT off
      

  6.   

    把除自动ID的给出列表即可。
    指定字段列表,如:
    insert into 表1 (字段1,...)
    select 字段1,...
    from 表2
    where 会员ID not in (select 会员ID from 表1)这里的字段列表去掉自动ID
      

  7.   

     wangtiecheng 
    不知不为过,不学就是错!的方法可以实现,我正好也遇到了这个问题,光把自动ID去掉还不行,需要在表后面列出对应字段,非常感谢!