| CompanyID | Year | TurnOver | OperationalEmpStrength | MarketingEmpStrength | FinanceEmpStrength | OtherEmpStrength |
| 2 | 2015 | 25 | 58 | 25 | 36 | 3 |
| 2 | 2015 | 25 | 58 | 25 | 36 | 3 |
| 2 | 2017 | 25 | 0 | 25 | 36 | 3 |
| 2 | 2016 | 0 | 0 | 24 | 0 | 0 |
i insert these value together using a loop(C#) and a insert query(store procedure)
if i want to update any of them what is the procedure

Puneet KankarRank #446 · 5.6K reputationPosted Jul 12, 2017, 4:43 AM EDT
Ibrahim SiddiqueRank #1,837 · 807 reputationPosted Jul 12, 2017, 7:25 AM EDT
INSERT INTO table (id, Year, TurnOver,OperationalEmpStrength,MarketingEmpStrength,FinanceEmpStrength,OtherEmp) VALUES(1, "A", 19) ON DUPLICATE KEY UPDATE Year=@Year, TurnOver=@TurnOver ,OperationalEmpStrength=@OperationalEmpStrength ,MarketingEmpStrength=@MarketingEmpStrength ,FinanceEmpStrength=FinanceEmpStrength@ ,OtherEmp=@OtherEmp