实例如下: update users set classes='1' where id in('u001','u002','u003','u004'); update users set classes='2' where id in('u005','u006','u007'); users表的内容如下: +------+-----------+------------+------+-------+---------+ | id | firstname | secondname | age |