Re: Hi all
Date: Fri, 21 Aug 2009 10:26:59 -0700 (PDT)
On Aug 18, 12:17 pm, Tim X <t..._at_nospam.dev.null> wrote:
> pal <jayadevpal..._at_gmail.com> writes:
> > Can any one tell me how to declare a temporary table in a trigger(like
> > in SQL Server)?
> OMG! Do NOT do it!
> 1. Avoid triggers unless there is a very good reason and no other
> solution will work. Triggers can easily get unmanageable and are
> effectively side effects that can make maintenance and debugging a
> nightmare (especially if different teams end up doing the maintenance).
> 2. Creating tables is a DDL (Data Definition Language) statement and
> therefore causes an implicit commit. This would cause unexpected
> behavior with transaction management etc (actually, I don't think you
> can have DDL in triggers for this reason).
> 3. Maybe consider a temporary global table which is created already and
> take advantage of its support for transaction independence etc. While
> its not clear why you want to create a table in a trigger, it is likely
> that the features of a temporary global table would provide what you are
> after - though I'm totally guessing of course as we have no details on
> what your trying to do).
> tcross (at) rapttech dot com dot au
Thanks for the comments. I am quiet happy to see these comments. I am getting some orders for my project which i have developed using SQL Server.But some clients need Oracle version. So I am just trying to spend some time on Oracle, which is new to me. Once again thanks for the advice. Received on Fri Aug 21 2009 - 12:26:59 CDT