• Why not just insert the row into the audit table first from SP directly and delete the actual table since you have all the needed info within SP itself? Using the trigger and context_info is complicating the code for no good reason that I can see based on the info in the article.

    I'm a big fan of KIS (keep it simple) principal. If you can avoid the triggers in the first place, absolutely avoid them.

    Tejas:

    In Application, it might happen that we allow the user to delete record from multiple pages OR sometimes some record will be deleted based on business condition. In any case, we need to make sure that we have audit data, who deleted and the reason?

    To make sure that we have audit data, trigger is a place where we can write a code to keep audit data when any information of that table is being changed.

    Thanks,

    Tejas

    SQLYoga.com

    Tejas Shah