How to toggle a boolean or tinyint field in MySQL Posted by jamie on 05 Aug 2011 in Notes If you have a boolean or tinyint(1) field in MySQL and you need to toggle the value without knowing in advance what the value currently is: UPDATE table SET field = !field This entry was posted by Jamie and filed under Notes.