Reputation: 8574
I have a table named as data1 with two columns (Name, address)
and an another table named as data2 with same columns
My question:
How to assign the value as 'USA' to address
column where the value in name
columns are equal in both the tables.
Upvotes: 0
Views: 1069
Reputation: 1526
UPDATE data2 SET
Address = 'USA'
WHERE Name IN (SELECT Name FROM data1)
Upvotes: 1