-1
How do I update where it will decrease the price of the product by percentage?
Example:
Table:
id | products
10 | 1.40
How do I update to 1.40 - 5%?
-1
How do I update where it will decrease the price of the product by percentage?
Example:
Table:
id | products
10 | 1.40
How do I update to 1.40 - 5%?
2
Five percent = 5 / 100
therefore:
preco = preco - ( preco * 5 / 100 )
Browser other questions tagged mysql
You are not signed in. Login or sign up in order to post.