Tuesday, June 10, 2008

[SQL] Update and trigger

Hi,

I need to increament a counter such as myTable.Counter of type integer everytime myTable.status a boolean column is updated. Can you help me complete this...

create trigger counter_trigger after update on myTable.counter
execute procedure 'BEGIN statement; statement; statement END'

Q1- how do I narrow the event to "update on a column not a row"
Q2- can I just provide an inline procedure for the execute

Thanks
Medi

No comments: