SQL UPDATE with LIKE

后端 未结 7 1640
夕颜
夕颜 2020-12-18 03:27

I was trying to update approx 20,000 records in a table by using statements like this one, however, I got the message say 0 row(s) affected so it didn\'t work.<

7条回答
  •  感情败类
    2020-12-18 04:08

    this is because your column name log_name should not be in ' quotes.

    "log_name" LIKE "%PC01%" condition will always fail and zero rows will get updated, try this:

    UPDATE nc_files 
    SET title ="Worklog details" 
    WHERE log_name LIKE "%PC01%";
    

提交回复
热议问题