Mysql
Q. To change the UnitPrice data
of all the rows by applying a 10% discount reduction on all the products.
write the command please
(spam ans will be reported/acc reported)
Answers
Answered by
7
Answer:
Use:
Update table_name set UnitPrice=UnitPrice-(0.1*UnitPrice);
Explanation:
- Update will interfere will update the table as per furthut commands.
- Set will change the older values to a new one.
- Using UnitPrice=UnitPrice-(0.1*UnitPrice); will change the new UnitPrice value to 0.1 times (or 10% = 10/100) of older value.
Similar questions