Mat41
Mat41

Reputation: 1267

mysql update one table with data from another

I am getting an issue with this update statement:

update customers
set customers.email = initialsynctemptable.thinkEmail,
    customers.packages = initialsynctemptable.thinkPackages 
FROM customers INNER JOIN initialsynctemptable
ON  customers.id = initialsynctemptable.customerID

and are using mySQL. There is a squigly line under the FROM word. Essentially I am trying to do an update one table (customers) with data from another table (initialsynctemptable).....Help! Thanking you

Upvotes: 1

Views: 87

Answers (1)

peterm
peterm

Reputation: 92785

Try

UPDATE customers c INNER JOIN 
       initialsynctemptable i ON  c.id = i.customerID
   SET c.email = i.thinkEmail,
       c.packages = i.thinkPackages 

Upvotes: 2

Related Questions