Hi guys,
Say I got two tables,
Table1 - columns A, B, C, flag - approx 200 000 rows
Table2 - columns A, B, C - approx 20 000 rows
What I want to do is:
Update Table1 Set flag = 1 Where "at least one row from Table2 has the same entries in columns A, B and C"
Right now I am solving this with a "select distinct A, B, C from Table2" and transform this into a long where condition (with php). afterwards I apply the above update with this where condition. However this aproche needs about 5 minutes to run and I believe this could be much faster when I just know the right MySql command for this.
Can anyone help me?
cheers,
Peter