UPDATE my_table
    SET my_field_1 = CASE id
        WHEN 1 THEN 'my_value_11'
        WHEN 2 THEN 'my_value_12'
        WHEN 3 THEN 'my_value_13'
    END,
    my_field_2 = CASE id
        WHEN 1 THEN 'my_value_21'
        WHEN 2 THEN 'my_value_22'
        WHEN 3 THEN 'my_value_23'
    END
WHERE id IN (1,2,3)
本文作者:子匠_Zijor,转载请注明出处:http://www.dengzhr.com/others/backend/sql/1342