Primary key field A, quantity field B
Entry to
A, B
1
22, 3,
1 5
When a primary key repeat cannot save, save, please implement the following:
A, B
1 7
2, 3,
The primary key automatically accumulate
There weren't enough points
CodePudding user response:
With the column, in the program or compile time don't write on the column data,CodePudding user response:
Column A is not the serial number, also need not on the list, only if A string fieldCodePudding user response:
Or write their own code to realize automatic accumulation of A fieldCodePudding user response:
Select A, sum (B) the from table group by ACodePudding user response:
Can be implemented through a database trigger to and home use solution before, through the inserted table, manual written statements primary key automatic accumulationCodePudding user response:
Can you point in detail?