update student set `weight` = case `name` when 'lin' then 100 when 'yang' then 101 when 'sun' then 103 else 104 end where class_id = '2';