Need help with SQL – I want to generate and update a column in every row with a different random number.
Database # Oracle 10g.
Example – When I do something like this it updates all the rows with the same number
update mytable r
set r.generated_num =
(select floor(dbms_random.value(100,9999999)) from dual).
Any advice?
Looks like sub-query is the problem.
This seems to be working-