January 11, 2006 at 11:28 pm
hi everyone,
i hv a problem,
how can i pass parameters in a trigger
plz help me out
thanx
January 12, 2006 at 2:17 am
I think there is misunderstanding about the trigger
though trigger is a stored procedure you can not execute it manuallly. it gets executed when you try to do Insert or update or Delete operration on particular table.
but you can make use of data which you have Inserted
(you can make use of Inserted table in trigger)
but can't pass any other parameter which is not a part of that particular table
January 12, 2006 at 2:25 am
yah,
fine, but suppose i hv updated a column(col1) in a table(tab1)
and there is a trigger which fires after updation so plz tell me how can i get the older col1 value and newer col1 value in this trigger
kk
January 12, 2006 at 2:36 am
updation is nothing but deletion followed by insertion
so you execute select col1 from deleted in trigger then you will get old value
select col1 from inserted will give you new value
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply