Can union (mySQL) also be used in Updates?

0

Example:

$query = "update tabela set coluna1 = 1 where id = {$id_m} union
          update tabela set coluna2 = 1 where id = {$id_v}";
    
asked by anonymous 22.08.2015 / 19:13

1 answer

1
  

UNION is used to combine the result from multiple SELECT statements   into a single result set.    link

At first it is used only in SELECT.

    
22.08.2015 / 19:43