MadProfessor
Technical User
Hi,
I have an empty column in a database, and I want to update it with a DIFFERENT random number for each record. When I use:
update table
set column = round(rand()*1000 + 1, 0);
it sets the same random number for all the records, which is no good to me. How do I get it to set a different random number for each record - do I need some sort of loop?
I have an empty column in a database, and I want to update it with a DIFFERENT random number for each record. When I use:
update table
set column = round(rand()*1000 + 1, 0);
it sets the same random number for all the records, which is no good to me. How do I get it to set a different random number for each record - do I need some sort of loop?