title: SQL Server Trigger not triggered after insert and update
body: <p>I want to copy the contents of a column into another column in the same table. Therefore, I created this trigger:</p>
  
  <pre><code>ALTER TRIGGER [dbo].[kennscht_copy_to_prodverpt]
  ON [dbo].[Stammdaten]
  AFTER INSERT
  AS
  UPDATE Stammdaten
  SET PRODVERPT = (SELECT KENNSCHT FROM INSERTED)
  WHERE SNR = (SELECT SNR FROM INSERTED);
  </code></pre>
  
  <p>But when I use an UPDATE on the table to update <code>KENNSCHT</code> to a different value, <code>PRODVERPT</code> is not updated as well. Now, you could argue that is because the trigger is on <code>AFTER INSERT</code> and not <code>AFTER UPDATE</code>, but when I change it so it's triggered by <code>UPDATE</code> and <code>INSERT</code>, whenever I update any row, I get an error message from SQL Server</p>
  
  <blockquote>
    <p>Cannot update row because it would make the row not unique or update multiple rows (2 rows) [sic]</p>
  </blockquote>
  
  <p>What is going on here? Either the trigger doesn't do anything, or it's messing up the whole table, making it un-updateable.</p>
  
  <p>Update: I also tried the following trigger:</p>
  
  <pre><code>UPDATE s
  SET s.PRODVERPT = i.KENNSCHT
  FROM Stammdaten s
  INNER JOIN INSERTED i ON i.SNR = s.SNR;
  </code></pre>
  
  <p>But it has exactly the same behaviour. If I use only <code>AFTER INSERT</code>, nothing changes and if I use <code>AFTER INSERT, UPDATE</code> I get the error message above.</p>
  
  <p>Update 2: There are no multiple rows in the table, I already checked that because I thought it might be connected to the issue.</p>