I have table question
id int
answers int
With every insert, delete call on this table I want to update answers column. I want to use trigger on this. I don’t know how I can read question.id within trigger for insert, delete.
Any help appreciated.
Thanks.
In triggers that happen after insert, you can select from the
insertedtable to get the id of any inserted rows. Likewise for delete, you can select from thedeletedtable.