Re: COALESCE does short circuit - NOT

  • From: Maxim <mdemenko@xxxxxxxxx>
  • To: uwe@xxxxxxxxxxxx
  • Date: Thu, 19 Jan 2012 17:37:24 +0100

Uwe, i think, it simply works  this way. It doesn't matter, should it be
short circuited or not, single reference in the select is sufficient for
oracle to increment the sequence (once per row in the resultset) - it can
be as well interpreted this way from documentation:
http://docs.oracle.com/cd/E11882_01/server.112/e26088/pseudocolumns002.htm#SQLRF50946

Within a single SQL statement containing a reference to NEXTVAL, Oracle
increments the sequence once:

For each row returned by the outer query block of a SELECT statement. Such
a query block can appear in the following places:

   -

   A top-level SELECT statement


The same effect you can observe in dead leafs of case statement (e.g. case
when 1=2 then seq.nextval -- will be incremented as well)

Best regards

Maxim

2012/1/19 "Uwe Küchler" <uwe@xxxxxxxxxxxx>

> Hi Folks,
>
>
>
>

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


Other related posts: