SQL update from one Table to another based on a ID match

后端 未结 22 1313
太阳男子
太阳男子 2020-11-21 22:49

I have a database with account numbers and card numbers. I match these to a file to update any card numbers to the account number, so

22条回答
  •  执念已碎
    2020-11-21 23:11

    Here's what worked for me in SQL Server:

    UPDATE [AspNetUsers] SET
    
    [AspNetUsers].[OrganizationId] = [UserProfile].[OrganizationId],
    [AspNetUsers].[Name] = [UserProfile].[Name]
    
    FROM [AspNetUsers], [UserProfile]
    WHERE [AspNetUsers].[Id] = [UserProfile].[Id];
    

提交回复
热议问题