Re: How to find only updated columns in a trigger.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 03/17/04


Date: Wed, 17 Mar 2004 15:34:27 +0100

You can use the UPDATE() function. See CREATE TRIGGER in Books Online.

-- 
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Gopinath Munisifreddy" <Gopinath@Microsoft.com> wrote in message
news:O0VvSuCDEHA.3348@TK2MSFTNGP11.phx.gbl...
> Hi,
>     How to find only the columns which are updated in trigger. My table
has
> got around 60 coulmns. In a trigger i want to know what are the columns
> updated when user executes an update statement.
>
> Thanks in advance.
> Gopinath M
>
>


Relevant Pages

  • Re: Auto truncate a string to be inserted to SQL table
    ... Tibor Karaszi, SQL Server MVP ... The trigger is merely used to call another ... > stored procedure to validate the record against predefined business rule. ... >> Tibor Karaszi, SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • Re: Auto truncate a string to be inserted to SQL table
    ... So the error is generated from the INSERT statement which then fires the trigger? ... Tibor Karaszi, SQL Server MVP ... >> Tibor Karaszi, SQL Server MVP ... The app will insert record to SQL table at the ...
    (microsoft.public.sqlserver.programming)
  • Re: Disabling triggers
    ... Tibor Karaszi, SQL Server MVP ... "Phil Davy" wrote in message ... > All I can think of doing is editing the existing trigger ...
    (microsoft.public.sqlserver.programming)
  • Re: problems updating nulls - am I being stupid?
    ... the trigger is clearly not designed to handle multi-row modifications. ... Tibor Karaszi, SQL Server MVP ... >> Tibor Karaszi, SQL Server MVP ... >>> UPDATE project ...
    (microsoft.public.sqlserver.programming)
  • Re: Trigger help please
    ... Tibor Karaszi, SQL Server MVP ... "Paul in Harrow" wrote in message ... >> the INSERT statement inside the trigger. ...
    (microsoft.public.sqlserver.programming)