V
V
vbuban2021-04-03 00:00:03
SQL
vbuban, 2021-04-03 00:00:03

How to make a request to change the desired value?

Hello, yes, my question for some users will be elementary and funny, but surprisingly, by googling, I could not find what I need!

And so:
There is a table conditionally TableName, it has cells id, name, number, cnt
In the id cell, for example, we have id from 1 to a million.
I want the id records that I indicated separated by a comma, for example: (1314, 24414 , 12121, 1141,12121,3453) the records in the cnt cell have changed, for example, from 1 to 0

That is, I take 1314, 24414, 12121, 1141,12121,3453 these id and I want to change their cnt to 0

How to make such a request?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2021-04-03
@zkelo

UPDATE `TableName` SET `cnt` = 0 WHERE `id` IN (1314, 24414, 12121, 1141, 3453)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question