Lampwrights Forum > Search Forums

Showing results 1 to 1 of 1
Search took 0.00 seconds.
Search: Posts Made By: Jeff
Forum: MySQL 02-23-2011, 11:10 AM
Replies: 0
Views: 51,977
Posted By Jeff
Toggling a MySQL TinyInt Column

This query:

UPDATE table set field= 1 - field

Will toggle a tinyint (boolean) column in MySQL. Note, that field should have a default value of either 0 or 1 but not NULL.
Showing results 1 to 1 of 1

 

All times are GMT -4. The time now is 02:54 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2021, vBulletin Solutions, Inc.