setting multiple column using one update

后端 未结 2 1095
生来不讨喜
生来不讨喜 2020-12-23 08:48

How to set multiple columns of a table using update query in mysql?

相关标签:
2条回答
  • 2020-12-23 09:14

    Just add parameters, split by comma:

    UPDATE tablename SET column1 = "value1", column2 = "value2" ....
    

    See also: mySQL manual on UPDATE

    0 讨论(0)
  • 2020-12-23 09:20
    UPDATE some_table 
       SET this_column=x, that_column=y 
       WHERE something LIKE 'them'
    
    0 讨论(0)
提交回复
热议问题