I have 3 tables in the database
first-table-name : savedemail
ID email
================
1 user.com
2 xy.com
3 user2.com
second-table-name : volley
mac email
===================
12345 hhhhh.com
22222 user2.com
33333 ggggg.com
third-table-name : macadd
mac
=========
00000
00000
22222
what I am trying to do is compare each row of email of savedemail table to the each row of email of volley table . if the email matches then I want to store mac of volley to mac of macadd table if it already not exists.
the my code below is not inserting anything to table also no errors\warnings
Here is query I am using
SELECT savedemail.email , volley.mac , volley.email
FROM savedemail
INNER JOIN volley
ON savedemail.email=volley.email
WHERE savedemail.email=volley.email REPLACE macadd (mac)
VALUES ('volley.mac')