Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table Trigger 1

Status
Not open for further replies.
Jun 3, 2004
14
US
Hi! I was wondering how would do create a trigger that would execute only if a particular column in a table has been updated? Thanks!
 
WIt depends on what you want the trigger to do.

Do you need to know that a row changed ?

Do you need to know which row changed ?

Do you need to see what the old and new values are from the row that changed.

DBomrrsm
 
Look up CREATE TRIGGER in BOL and check out the IF UPDATE (column) and IF (COLUMNS_UPDATED()) sections. Good luck!

--John [rainbow]
-----------------------------------
Behold! As a wild ass in the desert
go forth I to do my work.
--Gurnie Hallock (Dune)
 
Thanks for help, I wanted to know if a particular column in a row has been updated then run this trigger, I'll check BOL for those functions and try to figure this out :D thanks for the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top