So I want to change all the fields in the column allow_two_day_ordering to False. How can I change them all without doing it one by one. I have a much bigger list than this.
+-------+--------------------------------------+------------------------+
| ID | Venue_id | allow_two_day_ordering |
+-------+--------------------------------------+------------------------+
| 26862 | 099B4758-2D0B-E411-9406-00155DCFC111 | TRUE |
| 26865 | 4fcdf8dd-2f0b-e411-9406-00155dcfc111 | TRUE |
| 26868 | 9e4b1850-330b-e411-9406-00155dcfc111 | |
| 26871 | bb0ed477-360b-e411-9406-00155dcfc111 | TRUE |
| 26874 | 89d6b4c7-350b-e411-9406-00155dcfc111 | |
| 26877 | a40d0646-340b-e411-9406-00155dcfc111 | TRUE |
| 26880 | e6693bac-330b-e411-9406-00155dcfc111 | TRUE |
I think my query would be something like so:
UPDATE venue_locations set allow_two_day_ordering = FALSE WHERE ID = '26862,26865,26868';
Like so?
If you really want to set all the values to
falseyou can do this:Note: No
WHEREclause, so all rows will be selected.[Update, in response to question updates]
If you have a list you can do this:
The
INclause can work well for short lists and smaller tables. It can be slow for larger tables, but for a one-time update it'll probably be acceptable.If you want to reset all the
TRUEvalues toFALSE: