您可以这样操作:
UPDATE table_users SET cod_user = (case when user_role = 'student' then '622057' when user_role = 'assistant' then '2913659' when user_role = 'admin' then '6160230' end), date = '12082014' WHERe user_role in ('student', 'assistant', 'admin') AND cod_office = '17389551';我不了解您的日期格式。日期应使用本机日期和时间类型存储在数据库中。



