Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Can I have an instead of update and insert triggers on the same view?
Just done a quick check in 8.1.7
the following works:
create or replace trigger v_iu
instead of insert or update on v1
begin
if inserting then
null;
elsif updating then
null;
end if;
end;
/
> We've made good use of instead of triggers to do simple tasks. What
> don't you like about them?
I didn't say I didn't like them, I just said it was generally hard to code them correctly - which was a bit of a generalisation. More like 'if they are at all complicated, they tend to be very complicated'.
-- Jonathan Lewis Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk Practical Oracle 8i: Building Efficient Databases Publishers: Addison-Wesley Reviews at: http://www.jlcomp.demon.co.uk/book_rev.html Van Messner wrote in message ...Received on Sun Mar 18 2001 - 04:45:34 CST
>Hi Jonathan:
>
> Two questions:
> I don't have Oracle here today but can you use conditional predicates
in
>"instead of triggers" i.e. when inserting, when updating and so on? Then
>the poster would need only one trigger per view.
> We've made good use of instead of triggers to do simple tasks. What
>don't you like about them?
>
>Van
>
>
>
![]() |
![]() |