Given a table of students and grades, is there a way to increment each student’s grade by 10%, but without going over 100?
Right now I do
UPDATE studentCourse
SET grade = grade + 10 * (grade/100)
WHERE csid = 1
In other words, if a student has 60, after the update he should have 66. But if a student has a 98, after the update his grade should be 100 (and not 108).
All this has to be done in standard SQL
You could you just run two statements
followed by