Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Confusion About Sequence
hi
I read something about seqence there but still not clear please give some light on it
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/sql_elements6a.htm#4062
Within a single SQL statement containing a reference to NEXTVAL, Oracle increments the sequence only 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
-An INSERT ... SELECT statement (either single-table or
multi-table). For a multi-table insert, the reference
to NEXTVAL must appear in the VALUES clause, and the sequence is updated once for each row
returned by the subquery, even though NEXTVAL may be referenced in multiple branches of the
multi-table insert.
Thanx in advance
Khurram Received on Wed Apr 26 2006 - 04:49:57 CDT