vendredi 9 octobre 2015

Update all rows with random string every month using mysql

I am trying to create a mysql event that updates all rows with a random string every month. The string doesn't have to be unique.

CREATE EVENT IF NOT EXISTS `new code`
ON SCHEDULE EVERY '1' MONTH
??
UPDATE table
SET code = "rand(?)"

I have no idea how to do the rest!




Aucun commentaire:

Enregistrer un commentaire