Jump to content

Treterpeter

New Members
  • Posts

    2
  • Joined

  • Last visited

Treterpeter's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.