Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> getting NEXTVAL from User_sequences vs Dual

getting NEXTVAL from User_sequences vs Dual

From: <markag_at_my-dejanews.com>
Date: Wed, 08 Jul 1998 18:01:27 GMT
Message-ID: <6o0c5n$jl2$1@nnrp1.dejanews.com>


I'm curious as to why some of the existing code I'm working on retrieves the nextval for sequences through user_sequences instead of dual; example:

"SELECT SEQ_CUST_ID.NextVal from USER_SEQUENCES"

vs

"SELECT SEQ_CUST_ID.NextVal from DUAL"

I notice that when you retrieve from user_sequences, your nextval is incremented by the number of sequences within that schema times the increment value of the sequence, but when retrieved through DUAL, it is always the increment value. Is this because there is only one row in dual, and potentially many rows in user_sequences?

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Wed Jul 08 1998 - 13:01:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US