Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

How to update or add to table1 where email = table2.email?

westmatrix's profile image westmatrix posted 13 years ago in General Permalink
How to update or add to table1 where email = table2.email?
UPDATE 'table1' SET 'field1' WHERE 'email' = 'table2.email'


I don't think this is at all right but can't update or add data from new table?

Cheers
ansgar's profile image ansgar posted 13 years ago Permalink
Try this:
ALTER TABLE table1 ADD field1 VARCHAR(255);
UPDATE table1 AS t1, table2 AS t2 SET t1.field1=t2.field1 WHERE t1.email = t2.email;
westmatrix's profile image westmatrix posted 13 years ago Permalink
Wow that's amazing! happy

Thank you! :)
Code modification/commit from ansgar.becker, 11 years ago, revision 3627
Focus next or previous grid node on Shift+MouseWheel, in all trees. See http://www.heidisql.com/forum.php?t=7269

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.