vendredi 30 mars 2018

How can replace a column of all records with random strings?

I have a table customers_info in my MySQL having a column 'address'.

I would like to replace the values of 'address' in all the rows with random texts (anything, for example, like xwdjduhyrmdz) for the privacy reason.

I found this SQL and tried it on phpmyadmin but didn't work for me.

UPDATE customer_info
SET address = LEFT(REPLACE(CAST(NEWID() AS CHAR(40)), '-', ''), @Characters)

How can I do this ?




Aucun commentaire:

Enregistrer un commentaire