You are here: Re: SQL Server trigger that fires only on update of certain field? « MsSQL Server « IT news, forums, messages
Re: SQL Server trigger that fires only on update of certain field?

Posted by Michael Hotek on 10/02/99 11:55

Not directly. SQL Server is going to fire the trigger for the operation.
It doesn't conditionally fire it based on a column being changed. You can
accomplish this within your code by using the IF UPDATE(<columname>) clause.

--
Mike Hotek
MHS Enterprises, Inc
http://www.mssqlserver.com


<dba_222@yahoo.com> wrote in message
news:1155564108.206051.326610@74g2000cwt.googlegroups.com...
> Dear Experts,
>
>
> I'm an Oracle guy, who is being given more SQL Server assignments
> lately.
>
> I've been looking for things on the web about this, but I can't
> anything so far.
>
> In Oracle, I you can create a trigger on a table that -only- fires if
> certain fields are updated.
>
> create or replace trigger trg_some_trigger
> BEFORE insert
> OF some_field1, some_field2
> on tbl_some_table
> for each row
>
> ...
>
>
>
> Is this also possible in SQL Server?
> What is the syntax please?
>
>
> Thanks a lot!
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация