O
O
Optimus2017-03-26 10:12:25
MySQL
Optimus, 2017-03-26 10:12:25

How to quickly change the value in the database?

In the DB field, the value 0 or 1
is possible. Is it possible to change 0 to 1 with one request if there was 0 in the database at the time of the request, and vice versa, change 1 to 0 if there was 1 in the field at the time of the request?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rPman, 2017-03-26
Pyan @marrk2

update T set C = !C

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question