Hi all just a questions I wish to compare two tables against each other and then update a value in table 1 if there is match from table 2. but I get the error the column does not exist for table 2 what have i done wrong ? UPDATE table1 SET table1.row = 'y' WHERE table1.row = table2.row
You need to join the tables, otherwise the database has no idea what table2 is. Make sure you backup the tables before performing this. Without seeing the structure, I can't give a 100% accurate query. UPDATE table1 INNER JOIN table2 ON table1.some_column = table2.some_column SET table1.row = 'y'