UPDATE `user`
SET acces = (
CASE id
WHEN 50 THEN
'11'
WHEN 51 THEN
'33'
WHEN 52 THEN
'44'
END
),
pass = (
CASE id
WHEN 50 THEN
'1111'
WHEN 51 THEN
'1113'
WHEN 52 THEN
'1114'
END
)
WHERE
id IN (50, 2, 3)
字段描述:user :表名
id、pass、acces 都是字段名