SQL中更新:
UPDATE...
SET...
交换两个数用异或.
# Write your MySQL query statement belowupdate salary set sex = CHAR(ASCII('f') ^ ASCII('m') ^ ASCII(sex));
本文共 193 字,大约阅读时间需要 1 分钟。
SQL中更新:
UPDATE...
SET...
交换两个数用异或.
# Write your MySQL query statement belowupdate salary set sex = CHAR(ASCII('f') ^ ASCII('m') ^ ASCII(sex));
转载于:https://www.cnblogs.com/zywscq/p/10657127.html