Let take a example, there are two tables as bellow.
OldData
-----------
id
name
address
NewData
-----------
nid
name
address
I want to update OldData table with NewData table.
For that purpose I am trying to use the following query:
UPDATE OldData SET (name, address) = (SELECT name, address FROM NewData WHERE nid = 234)
WHERE id = 123
But it gives a syntax error.
What is the proper way of doing what I try?