Suppose I have a table like this:
Number Product Type
1 Meat Cow
1 Milk A
If I insert a new row:
INSERT INTO t1 (Product, Type) VALUES (Meat, Cow)
I don't want a new row. I want the column "Number" where Product = Meat and Type = Cow be incremented by 1:
Number Product Type
2 Meat Cow
1 Milk A
Is there a SQL command to do this?
(Product, Type)you can useinsert on conflict do update ...