N
N
Nikita2016-01-19 13:45:15
MySQL
Nikita, 2016-01-19 13:45:15

How to correctly compose an update query in mysql?

e13b8a5db47b4d98afa4c7d8022f256d.png
How to change absolutely all prices in columns price1 and price2 by 300 rubles?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Peter, 2016-01-19
@nikita0509

If you increase the price by 300 rubles, then

update tableName set price1= price1 + 300, price2= price2 + 300

K
kretsu, 2016-01-19
@kretsu

well, in the general case (not taking into account MySQL syntax) something like this
update tableName
set price1=300,
price2=300
commit
but maybe I didn't understand the problem?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question