title: How to refer to "New", "Old" row for Triggers in SQL server?
body: <p>SO I'm new to SQL server from SQLite and I am used to using the New|Old keywords. I have seen that some people use the <code>inserted</code> value refer to a newly created row, but this would only apply on an insert and not an update. Howe can I get something like the <code>New</code> I use in this query?</p>
  
  <pre><code>create trigger ports_country_id_in_check
  on [SISTEMA].Puerto
  after insert, update
  AS
  BEGIN
    update [SISTEMA].Puerto
    set country_id = (select secuencia from [SISTEMA].Pais where codigo = New.pais_asociado)
    where [SISTEMA].Puerto.secuencia = New.secuencia
  end
  </code></pre>