Update multiple rows with different values in a single SQL query

前端 未结 6 664
你的背包
你的背包 2020-12-13 09:15

I have a SQLite database with table myTable and columns id, posX, posY. The number of rows changes constantly (might inc

6条回答
  •  不知归路
    2020-12-13 09:55

    Use a comma ","

    eg: 
    UPDATE my_table SET rowOneValue = rowOneValue + 1, rowTwoValue  = rowTwoValue + ( (rowTwoValue / (rowTwoValue) ) + ?) * (v + 1) WHERE value = ?
    

提交回复
热议问题