Answers for "sql update 1 table using another"

SQL
2

sql update from different table

-- SQL Server
UPDATE Sales_Import
SET Sales_Import.AccountNumber = RAN.AccountNumber
FROM Sales_Import SI
INNER JOIN RetrieveAccountNumber RAN
ON SI.LeadID = RAN.LeadID;
-- MySQL & MariaDB
UPDATE Sales_Import SI, RetrieveAccountNumber RAN
SET SI.AccountNumber = RAN.AccountNumber
WHERE SI.LeadID = RAN.LeadID;
Posted by: Guest on May-13-2020

Code answers related to "sql update 1 table using another"

Code answers related to "SQL"

Browse Popular Code Answers by Language