11-20-2023, 02:15 AM
This UPDATE statement will change the a_needMP value in each row of the t_skilllevel table based on the specified conditions.
Simple but effective, feel free to use. Could be used in a similar way to adjust exp, gold and and and...
UPDATE t_skilllevel
SET a_needMP = CASE
WHEN a_needMP >= 500 AND a_needMP <= 750 THEN a_needMP * 0.70
WHEN a_needMP > 750 AND a_needMP <= 1000 THEN a_needMP * 0.50
WHEN a_needMP > 1000 AND a_needMP <= 1500 THEN a_needMP * 0.35
WHEN a_needMP > 1500 AND a_needMP <= 2000 THEN a_needMP * 0.25
WHEN a_needMP > 2000 AND a_needMP <= 3000 THEN a_needMP * 0.17
WHEN a_needMP > 3000 THEN a_needMP * 0.03
ELSE a_needMP
END;

