I have created a new table identical to the original one and I would like to copy all the data to the new table in a random way.
I use:
INSERT INTO `new_table` ('id', 'value')
SELECT 'id', 'value' FROM `original_table` ORDER BY RAND();
But as result I get new table in the same order as original one. For some reason RAND() is not working.
Aucun commentaire:
Enregistrer un commentaire