I have to update a duplicate row. This is a new table so there'll be no duplicates but if someone tries to insert a duplicate I need to update the duplicate row with the new values instead of creating a new one. This is what I have for triggering the trigger
SQL
CREATETRIGGER<name>ON<table>AFTERINSERTASIF(SELECTcount(ID)frominsertedWHEREEXISTS(SELECTIDFROM<table>WHERE<table>.<col1>=inserted.<col1>ANDID!=inserted.ID))>0BEGINUPDATE<table>SET<col1>=<somevalue>,<col2>=<somevalue>WHEREID=<somethinggoeshere)END