Browse ALL the snippets ! - Page 7 of 7

Quick way to invert the value of a boolean field in SQL (switching 0/1)

UPDATE users SET is_admin = (1 - is_admin) WHERE [...]