34,873
社区成员
发帖
与我相关
我的任务
分享
[Quote=引用 2 楼 libin_ftsafe 的回复:]
如果只有 1 和 0 两个值:
SQL codeupdate tbl set commend=1-commend where id=8
update tbl set commend=1-commend where id=8update tbl set commend=(case commend when 1 then 0 when 0 then 1 else commend end) where id=8