I have a table in MySQL
that looks like this:
studentID
subjectID
anotherID
anotherID2
, AnotherID3
, studentScore
This table has about 100M
records of students in it.
Suppose that I have the following information stored in two python
lists:
listStudentIDs
= [1, 123, 33, 5524, 425653]
listNewScores
= [12.76, 73.2, 83.893, 92.3, 53.6]
Is it possible to have one query
that will update all studentScore
fields for all students (whose IDs are in listStudentIDs
) if, and only if, their score in listNewScores
is greater than their score currently stored in the database ( studentScore
)?