当前位置 : 主页 > 数据库 > mssql >

SQL高级应用之同服务器上复制表到另一数据库中

来源:互联网 收集:自由互联 发布时间:2021-04-05
SQL语句: 复制代码 代码如下: INSERT INTO Whir_ezMall_Full_c..Whir_Member(MemberID, LevelID, Account, MemberPWD, Email, Integral, MemberName, MemberStatus, Sex, Birthday, Area, Adress, ZipCode, Tel, Mobile, SaveQuestion, SaveAnswe

SQL语句:

复制代码 代码如下:
INSERT INTO Whir_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)
SELECT 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 FROM Whir_ezMall_Full..Whir_Member
WHERE Whir_ezMall_Full..Whir_Member.MemberID NOT IN (SELECT MemberID FROM Whir_Member)

网友评论