Update records with random number
mysql, phpmyadmin
Solution
`RAND()` produces random float values from 0 to 1. Could you try this?
Update videos set views = CAST(RAND() * 10000 AS UNSIGNED)
Problem
I have a 200k rows mysql table, and a column with empty value, and i like to populate this column with random numbers from 1 to 10,000. I don't know if its possible to have a query something like this: ``` UPDATE 'videos' SET 'views' = rand(1,10000) ```