SQL Update Query Multiple Conditions -
update table set x = 0,y = 0 table x > 9.99 or y > 9.99
i need set x's value 0 if exceeds 9.99 , set y's value 0 if exceeds 9.99.
how can achieve in sql.
mine seems incorrect.
please help.
update your_table set x = case when x > 9.99 0 else x end, y = case when y > 9.99 0 else y end x > 9.99 or y > 9.99
Comments
Post a Comment