将数据从一个数据库表中导入另一个数据库表中为何实现不了,求高手指点
insert into bizbakdb.dbo.customer (num,name,telephone,address,conperson)
select * from bizdb.dbo.customer ;
------解决方案--------------------
- SQL code
insert into bizbakdb.dbo.customer (num,name,telephone,address,conperson) select num,name,telephone,address,conperson from bizdb.dbo.customer
------解决方案--------------------
什么数据库?
MSSQL2000的话,应该是你两边的数据库表结构不一致·
表结构完全一样的话,语句应该是没问题的·不一样那必须指定对应的列
- SQL code
INSERT INTO bizbakdb.dbo.customer(num,name,telephone,address,conperson) SELECT * FROM bizdb.dbo.customerINSERT INTO bizbakdb.dbo.customerSELECT * FROM bizdb.dbo.customerINSERT INTO bizbakdb.dbo.customerSELECT num,name,telephone,address,conperson FROM bizdb.dbo.customerINSERT INTO bizbakdb.dbo.customer(num,name,telephone,address,conperson)SELECT num,name,telephone,address,conperson FROM bizdb.dbo.customer
------解决方案--------------------
- SQL code
select * into bizbakdb.dbo.customer from bizdb.dbo.customer ;