MySQL - UPDATE query based on SELECT Query

后端 未结 11 2227
既然无缘
既然无缘 2020-11-21 23:58

I need to check (from the same table) if there is an association between two events based on date-time.

One set of data will contain the ending date-time of certain

11条回答
  •  一个人的身影
    2020-11-22 00:51

    Easy in MySQL:

    UPDATE users AS U1, users AS U2 
    SET U1.name_one = U2.name_colX
    WHERE U2.user_id = U1.user_id
    

提交回复
热议问题