1312月 2022 mysql把某个二进制字段设为0或1 by 爱偷吃猫的鱼 把某字段第10位设置为1 update tests set uid = uid|(1 << 10) where id=1; 把某个字段第10位设置为0 update tests set uid = uid&~(1 << 10) where id=1; Posted in: MYSQL ⋅ Tagged: mysql