Home > database > How the SQL statement to update twice the price of a table
How the SQL statement to update twice the price of a table
Time:05-08
all the unit price discount of 8.8 is greater than or equal to 3000 products, 9 discount price is less than 3000 products, update relevant information, The update The set statement how to implement,
CodePudding user response:
The UPDATE table SET price=(CASE WHEN the unit price & lt; 3000 THEN the unit price * 0.9 ELSE unit price * 0.88 END)