mysql – SQL UPDATE 140 rows in a table with products

Hi Database Administrators, I’ve got table with 140 products. Like this:

id product_code ean_code
1 0798 8594988
2 0799 8594978

And I would like to update all 140 products with new unique product_code and new unique ean_code. Please any simple fast method?

I’ve got idea about writing 140 UPDATE commands (like bellow) but I don’t think it’s much smart/elegant 😀

UPDATE products SET product_code = 1234, ean_code = 456789 WHERE id = 1;

So every idea is welcome :)) Thanks 🙂