SET grade = CASE WHEN marks <=24 THEN 'F'
WHEN marks>=25 AND marks <30 THEN 'D-'
WHEN marks>=30 AND marks <35 THEN 'D'
WHEN marks>=35 AND marks <40 THEN 'D+'
WHEN marks>=40 AND marks <45 THEN 'C-'
WHEN marks>=45 AND marks <55 THEN 'C'
WHEN marks>=55 AND marks <60 THEN 'C+'
WHEN marks>=60 AND marks <65 THEN 'B-'
WHEN marks>=65 AND marks <70 THEN 'B'
WHEN marks>=70 AND marks <75 THEN 'B+'
WHEN marks>=75 AND marks <80 THEN 'A-'
ELSE 'A' END
It works well when I execute your code segment after each time I insert some values to other columns. What I want is to make it happen automatically.
when I enter values to other columns, it should automatically fill grade column with relevant grade. any Ideas How to get this done? any procedures or functions that i could use?