Match 2 sql columns if = then update a different column by 1

后端 未结 3 1391
长情又很酷
长情又很酷 2020-12-21 15:12

Im looking to see if there is a match between what someone submitted in one table to a different table in the database. I can\'t quite figure out how to set it up. What im

3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-21 16:09

    I guess you can do this in mysql:

    UPDATE TableA a, TableB b 
    SET a.ColumnC = ColumnC + 1 
    WHERE a.ColumnA = b.ColumnB; 
    

提交回复
热议问题