Subject Updatable views
Author Marcin Bury
Hello all

Can someone explain how updatable view works.

I have created a view for a table - the view is exact copy of underlaying table:
same structure.
Then I have created set of triggers: 'before insert', 'before update', 'before
delete'. Then I granted only select for certain user. Now user can read the data
but cannot add or modify records. When I grant insert on this view - the insert
of the record happens twice - one directly and then through the before insert
trigger.

What I want to achieve is to do insert via the trigger (complex stored
procedure) because sometimes this insert has to be switched to update when
certain conditions are fulfilled (checked in this stored procedure).

TIA

Marcin