• opc.three (1/6/2013)


    Bhuvnesh (1/6/2013)


    certainly , we can have trigger (instead of) but i will suggest to set the trigger on table.

    That likely will not help the situation. There is unique value added to the system when an instead trigger is placed on a view that joins multiple tables. Namely that we can support inserts into that view where before, without the instead trigger, we could not.

    From http://msdn.microsoft.com/en-us/library/ms175521(v=sql.105).aspx

    The primary advantage of INSTEAD OF triggers is that they enable views that would not be updatable to support updates. A view based on multiple base tables must use an INSTEAD OF trigger to support inserts, updates, and deletes that reference data in more than one table.

    diamond studded link ..thanks 🙂

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)