This is not my area but Triggers are also part of SQL SERVER
You can create triggers on tabls and views
basically, there are 3 types of triggers
Insert, Update, Delete
And
'Instead Of' is keyword that you can use with all above (3) types
You can access Insert,Deleted as
If(select col from inserted/deleted where col = 1)
begin
raiserror('You can not insert/delete this record.',16,3)
return
end
Actually, Insert, Update , Delete fire after insert ... it mean you may say these are AFter Insert, After Update, and After Delete
'After' are delfault tirggers....
But you need to know about Binery '&' Operator to know about updated columns.... check out BOL ... (Books OnLine)
Hope it will help you...
Stay Beautiful,
Abdul Salam
There is no moving creature on Earth whose sustenance is not provided by Allah. He knows its living and its resting place,
and all that is recorded in a glorious Book. (Al-Quran)
|