Java Mailing List Archive

http://www.dba.5341.com/

Home » Home (12/2007) » oracle l »

Re: How to check if index was updated?

Tim Hall

2006-04-27

Replies:

Another thing to watch out for in this scenario is database triggers.  (This is a common situation in Oracle Forms shops, where the default behavior of forms is to update all of the selected database columns as opposed to just the ones that changed).
 
As a general rule, it's smart to construct the WHEN clauses of database triggers to fire only when the values of the columns you care about are actually changing:
 
Wrong:
WHEN UPDATING(mycolumn)
 
Right (one possible method):
WHEN (NVL(OLD.mycolumn,some impossible value) != NVL(NEW.mycolumn,same impossible value))
 
HTH
Tim

 
On 27 Apr 2006 07:11:47 -0700, David Aldridge <david@david-aldridge.com> wrote:
It certainly shows the right attitude!

rjamya wrote:
> they haven't settled on the solution ... yet, and that's why they
> asked me. Which is nice, right?
>
>
>

--
http://www.freelists.org/webpage/oracle-l



©2008 dba.5341.com - Jax Systems, LLC, U.S.A.