I have a table named Orders
and a column in that table named OrderID
. Initially the value for the OrderID
is given manually, but now I have to change those values to random of numbers between 100 and 999.
I have nearly 600 rows... When I tried the following code it assigned a single random number to all the orders. Kindly help me on this, and explain me what's the easy and right way to solve this.
UPDATE Orders
SET OrderID= RAND()*(999-100)