clear markdown compare help donate or buy diddy dollings comments/suggestions/bugs a leap of faith? bible365
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 648479 fiddles created (15203 in the last week).

create table members ( member_id int , experience int , level_ varchar(32) as ( case when experience between 0 and 999 then 'level 1' when experience between 1000 and 2399 then 'level 2' when experience between 2400 and 3999 then 'level 3' when experience between 4000 and 7999 then 'level 4' when experience between 8000 and 14999 then 'level 5' when experience between 15000 and 23999 then 'level 6' when experience between 24000 and 34999 then 'level 7' when experience between 35000 and 49999 then 'level 8' when experience >= 50000 THEN 'level 9' end )virtual );
 hidden batch(es)


insert into members (member_id, experience) values (1,2200),(2,3800),(3,7800);
 hidden batch(es)


select * from members;
member_id experience level_
1 2200 level 2
2 3800 level 3
3 7800 level 4
 hidden batch(es)


update members set experience = 25000 where member_id = 1;
 hidden batch(es)


select * from members;
member_id experience level_
1 25000 level 7
2 3800 level 3
3 7800 level 4
 hidden batch(es)