insert table1 select * from table2 where '列名' like '条件' 如有indentity属性需加上 SET IDENTITY_INSERT EnterpriseData ON -- 允许将显式值插入表的标识列中。 SET IDENTITY_INSERT EnterpriseData off
不同库还得加上 insert '库名'.'用户'.table1 select * from '库名'.'用户'.table2 where '列名' like '条件'
select * from table2 where '列名' like '条件'
如有indentity属性需加上
SET IDENTITY_INSERT EnterpriseData ON -- 允许将显式值插入表的标识列中。
SET IDENTITY_INSERT EnterpriseData off
insert '库名'.'用户'.table1
select * from '库名'.'用户'.table2 where '列名' like '条件'