Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Bogus table for "instead of" trigger

Re: Bogus table for "instead of" trigger

From: Stephen B <stephen.bell_at_cgi.ca>
Date: Thu, 7 Feb 2002 12:49:44 -0500
Message-ID: <L8z88.18533$5K1.3046933@news20.bellglobal.com>


Hi,

This is just my personal opinion but the reasoning my become more clear if you consider a complex view
made up of several tables...assume further that your users are interacting with the view and you want something
to happen as a result of performing DML on the view (which to them is a "table") ...in that type of example it may make more sense why the trigger operates on the view and not the table...recall also that instead of triggers are often used because the requested DML would not be allowed through the view.

In your example you made a simple view which was just the mirror image of the table so the reasoning is less clear.

I hope this is helpful,

Steve

"Morten" <morten_at_kikobu.com> wrote in message news:3C629E48.3090708_at_kikobu.com...
>
> Hi. From the documentation I can see that "instead of" triggers
> only can be placed on views. So I need to:
>
> create table bogus_table (id number);
> create view bogus_view as select id from bogus_table;
>
> create trigger bogus_trigger
> instead of insert into bogus_view
> .
> .
>
> Is this the correct way? Seems strange. What's the reasoning
> for not being able to make an "instead of" trigger directly
> on the table?
>
> Morten
>
Received on Thu Feb 07 2002 - 11:49:44 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US