MSSQL After Update Trigger: Multi Row Stored Prc
<p>I've written a stored procedure which I would like to invoke on row updates.</p>

<p>It could look something like this:</p>

<pre><code>Create PROCEDURE [TraceChange]
    @Id uniqueidentifier,
AS
BEGIN
    /*do some inserts, updates, etc*/
END
</code></pre>

<p>Now I create a trigger for a Table, which works fine for a single row update:</p>

<pre><code>Create TRIGGER T1_TraceInsert
   on T1
   AFTER UPDATE
AS 
BEGIN
    SET NOCOUNT ON;
    declare @id uniqueidentifier
    exec TraceChange @id
END
</code></pre>

<p>This works fine - but just for a single Row.
How do I rewrite it to execute on <strong>multi row updates</strong>?
AFAIK its not a great approach to use a cursor within such triggers.</p>

<p>Thanks!</p>