CREATE TABLE a( NAME INT, age int ); CREATE TABLE b( height INT, weight int ); INSERT INTO a VALUES (1,2); INSERT INTO b VALUES (2,3); SELECT * FROM a; SELECT * FROM b; SELECT * FROM a; update a s, b c set s.name = c.height where s.age = c.height;