How do I do an update where the price of the product will decrease by percentage?
Example:
Table:
id | products
10 | 1.40
How do I make an update that returns the value 1.40 - 5%?
How do I do an update where the price of the product will decrease by percentage?
Example:
Table:
id | products
10 | 1.40
How do I make an update that returns the value 1.40 - 5%?
Five percent = 5 / 100
therefore:
preco = preco - ( preco * 5 / 100 )