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: 1
Views: 65,992
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:57 PM.


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