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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -