用Select into怎么写
追答select 字段A,字段B,字段C INTO 新表 from 被复制的表 where 条件 ,其中ABC字段为被复制表中的字段,
create table a
( a int,
b int,
c int)
go
insert into a values(1,1,1)
insert into a values(2,3,1)
insert into a values(4,5,8)
insert into a values(2,6,1)
将a表中字段a=2的记录找出插入到新表b中
select a,b,c into b from a where a=2
是跨数据库的,两张表不在同一个数据库
追答是什么数据库?用导出导入就很方便了。
或者select * from dba.table1 insert into dbb.table2;
试试