How to refer to the new inserted row in TSQL Trigger -


I know that if you want to mention a new cast line in plpgsql, you can type " NEW ". How do I do this in T-SQL (Transcript SQL)?

The following trigger is what I am trying to create:

  set to set rules_table trigger setAlertId INSERT AS DECLARE @max_id integer SELECT @max_id = (by rules Select the maximum (alert ID). Get the error message to: NEW.AlertId = @ max_id + 1 END  

I get the error message:

< P>

DML trigger statement two special Tables are used: deleted table and inserted tables. SQL Server automatically creates and manages these tables. You can use these temporary, memory-resident tables to test the effects of some data modifications and set conditions for DML trigger tasks. You can not modify data directly in tables


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -