项目需求:将数据库Whir_ezMall_Full中的表Whir_Member的数据迁移到数据库Whir_ezMall_Full_c中的Whir_Member表,已存在的ID记录则不插入。
SQL语句:
代码如下:
INSERTINTOWhir_ezMall_Full_c..Whir_Member(MemberID,LevelID,Account,MemberPWD,Email,Integral,MemberName,MemberStatus,Sex,Birthday,Area,Adress,ZipCode,Tel,Mobile,SaveQuestion,SaveAnswer,CreateData,LastLoginData,ImgUrl,LimitIntegral,IntegralBeginTime,IntegralEndTime,memberType,BankType,BankRegion,BankAddress,BankAccount,BankName,IsQQ)
SELECTMemberID,LevelID,Account,MemberPWD,Email,Integral,MemberName,MemberStatus,Sex,Birthday,Area,Adress,ZipCode,Tel,Mobile,SaveQuestion,SaveAnswer,CreateData,LastLoginData,ImgUrl,LimitIntegral,IntegralBeginTime,IntegralEndTime,memberType,BankType,BankRegion,BankAddress,BankAccount,BankName,IsQQFROMWhir_ezMall_Full..Whir_Member
WHEREWhir_ezMall_Full..Whir_Member.MemberIDNOTIN(SELECTMemberIDFROMWhir_Member)
更多信息请查看IT技术专栏