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.

Thanks.

1 Answers
George
George

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