使用case when then是可以的
update table set name = case when name='张三' and sex='男' then '李四' end,
case when name='李四' and sex='女' then '张三' end
use TableName
update TableName set PersonName='李四' where PersonName=‘张三'
TableName 为你的表名
PersonName 为 TableName 表中 姓名字段
update tablename set name='李四' where name=‘张三';
UPDATE TABLENAME SET FIELDNAME='李四' WHERE FIELDNAME='张三'
update tab_name set name =
(case when sex='男' and name='张三' then '李四' when sex='女' and name='李四' then '张三' end)
没测试过,具体思路就是用case when
UPDATE TABLE
SET LAST_NAME ='李四‘
WHERE LAST_NAME=’张三‘;