I would like to know the best method to perform update in a table that I have where there are 3 columns:
ID, Key, Value
Today I'm doing this:
UPDATE dbuf.dmds SET situacao = '0' WHERE id_demanda = '1';
UPDATE dbuf.flxs SET valor = '1' WHERE id = '22' AND chave = 'votos';
UPDATE dbuf.flxs SET valor = '4.5' WHERE id = '22' AND chave = 'tempo_etapa';
UPDATE dbuf.flxs SET valor = '2015-02-13 16:42' WHERE id = '22' AND chave = 'ult_mod';
Imagine that this is in a concatenated single text command, but I know the bank will do 1 instruction at a time, so I would like to know if I can do the 'one shot' procedure for there are some errors, do not create 'orphan' values in the table.
Thanks in advance!