开发者

SQLITE update multiple row from stock where we have a product with multiple record

I want to create a trigger for product table to update qty afte开发者_如何学JAVAr selling product .

I have a table of product like this productTB with name and qty fields :

NAME QTY
'A' 1
'B' 4
'A' 4

I want to write a query for remove 2 qty for 'A' item.

I want the qty of 'A' item be like this

NAME QTY
'A' 0
'B' 4
'A' 3

How can do this in SQLite?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜