I need a column (LineCount) that increments for every instance of an ID in another column (ItemID) for example:
|ItemID|LineCount|
------------------
| 1 | 1
------------------
| 1 | 2
------------------
| 1 | 3
------------------
| 2 | 1
------------------
| 2 | 2
------------------
| 2 | 3
------------------
| 2 | 4
------------------
| 2 | 5
------------------
| 3 | 1
------------------
| 3 | 2
------------------
| 3 | 3
------------------
| 3 | 4
SQL may look something like:
"Insert into TableA increment LineCount Where ITEMID = @ITEMID"
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…