Skip to content
Advertisement

Bulk change all entries for a particular field in SQL database

Let’s just say I have a table called TABLE_NAME that looks like this:

id  | name  | changeme
------------------------
1   | One   | 1
2   | Two   | 0
3   | Three | 1
4   | Four  | 0
5   | Five  | 0

Is there an SQL statement I can run on this to change every changeme entry to ‘0’?

Advertisement

Answer

do you mean?

UPDATE TABLE_NAME SET changeme = 0
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement