How to decrease value for a int column in SQL query?

I have working on the eCommerce website, while place an order I want to decrease the product table quantity column. Help me to get solution.


1 Answers

Hi, you can get solution for this by simply using the below query 

UPDATE products SET quantity = quantity - 1 WHERE productid=1
Add Your Answer