You can try this. Use IF in the select query and update the table you want;)
create a student table (marked as int, class char);
insert into student values ββ(200, zero), (120, zero), (130, NULL);
UPDATE Student's INTERNAL CONNECTION (select s.marks, IF (s.marks> = 200, 'A', IF (s.marks> = 130, 'B', 'P')) AS Grade from student s) b to a .marks = b.marks SET a.Grade = b.Grade;
Kumar harsh
source share