133

Tom Milewski

Easily Toggle a Boolean Value with SQL

Here’s how you can simply and easily toggle a boolean field using only SQL

Here’s how you can simply and easily toggle a boolean field using only SQL:

UPDATE [table] SET [field] = 1 XOR [field] WHERE [conditions]

Comments are closed.

Categories

Content © Tom Milewski
Proudly powered by WordPress
Theme designed by Artisan Themes

Entries (RSS)
Comments (RSS)

20 queries.
0.290 seconds.