SyntaxFix
Write A Post
Hire A Developer
Questions
UPDATE table SET A = IF(A > 0 AND A < 1, 1, IF(A > 1 AND A < 2, 2, A)) WHERE A IS NOT NULL;
you might want to use CEIL() if A is always a floating point value > 0 and <= 2
CEIL()
A
> 0
<= 2