SQL multi SET with one WHERE

database, set, sql, where-clause

Solution

This is possible,

UPDATE table SET Name = 'aaa', Col2 = 'bbb' WHERE ID IN (2555, 2666)

What you are asking for is setting multiple values to same column and same row.

Problem

Similar to this question : SQL Statement with multiple SETs and WHEREs Is there a way to perform multiple sets, as shown below. ``` UPDATE table SET ID = 111111259 SET Name = "Bob" SET Phone = 1111111261 WHERE ID = 2555 ``` Thanks.

Original source

Related problems