数据库一个表的某字段内容导入到另一个数据库表的某字段中

示例:
insert into user (name)
select name
from A.dbo.user
实例:

导入会员表:(

member_info,要导入的目标表,shualodb.dbo.KS_User,hualodb(另个数据库)的源表

insert member_info (memberId,memberName,pwd,operationPwd,name,phone,balanceItemId,FreezeAmeny,createDate,

isLogin,isDel,workMeetNum,workRelNum,totalMeetNum,totalrelNum,email,addres,qq,headimg,typeItemId,levelId,sex,isAduit,Balance,Integration,

paipaiRelease,taobaoRelease,aliRelease,allCollect,allRelease,allFlow,vipValid,safeMoneyItemId,trustTypeItemId)

select UserID,UserName,'E10ADC3949BA59ABBE56E057F20F883E','E10ADC3949BA59ABBE56E057F20F883E',RealName,Mobile,'aeb422a7-dead-4b9a-8c85-a363238099e5',

0,'2014-01-01 00:00:00.000',1,0,0,0,0,0,Email,Province+City+[Address],QQ,UserFace,'895e4e18-bbd8-4728-9ced-f855201681cf','44051fcb-5e6b-44a5-9707-adb689e9a168',

0,0,0,0,0,0,0,0,0,0,'2000-01-01 00:00:00.000','4306e7eedb194deb9a07e4110f4b2c14','7af33fc5e3a14efc99231c900e89f97e'

 from shualodb.dbo.KS_User


delete member_info where createDate='2014-01-01 00:00:00.000'

RegDate

posted @ 2016-07-29 14:04  离。  阅读(45)  评论(0编辑  收藏  举报