insert into 表1 select * from 表2 where 表2.id not in(select id from 表1)
insert into t1 select * from t2 where t2.id not in(select id from t1)
服务器: 消息 8101,级别 16,状态 1,行 1 仅当使用了列的列表,并且 IDENTITY_INSERT 为 ON 时,才能在表 '订单总表' 中为标识列指定显式值。我的SQL语句:insert into 订单总表 select * from 订单总表时 where 订单总表时.订单号 not in (select 订单号 from 订单总表)订单号,为主键
insert into t1 select * from t2 where t2.id not in(select id from t1)
仅当使用了列的列表,并且 IDENTITY_INSERT 为 ON 时,才能在表 '订单总表' 中为标识列指定显式值。我的SQL语句:insert into 订单总表 select * from 订单总表时 where 订单总表时.订单号 not in (select 订单号 from 订单总表)订单号,为主键