You could do this as below: 1. Create a new List to store all values of ID_STATION 2. Use Random class to generate a random index from 0 to upper bound value of the above List 3. Add the value corresponding to this index into a new List 4. Remove the value from the old List 5. Repeat from 2 until the old List become empty. 6. Update every record in your table Update tableName set ID_STATION = stationList[i] where ID_EMPLOYEE = employeeList[i]
"Never memorize something that you can look up." - Albert_Einstein