0
放在我有一个产品表与列量和车表与的productId和PurchaseQuantity列。 什么是根据clientId从购物车表中选择所有productId和PurchaseQuantity的代码(它可以是多个)。之后,特定产品数量将根据购买量减少。 如:产品数量将减少订货时在ASP.net
product table
productid Quantity
1 10
2 20
cart table
productId purchasedQuantity
1 5
2 3
now product table will be
productid Quantity
1 5
2 17
什么将是这个SQL查询?任何解决方案