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?
精彩评论