Title: RE: Creating sequences on the DUAL table?

Sequences are DB objects independent of any tables including dual (not
possible to create a sequence "on" a table.  Sequences are sometimes used
to populate the PK of a table, but the actual sequence and the table are
not structurally related. 

Such as:

SQL> create sequence myseq;

Sequence created.

Then, often developers will use the dual table when grabbing the next value from
the sequence.

SQL> select myseq.nextval from dual;

better to do this...insert into table1(id,name) values(myseq.nextval,'FName');

Check out the info in the docs on Sequences, maybe the concepts part would be a
good start.

HTH


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 1:54 PM
To: Multiple recipients of list ORACLE-L
Subject: Creating sequences on the DUAL table?



I have a request from one of our developers to create two new sequences on
the DUAL table.

This seems like a bad idea to me.   I've never had such a request in the
past.   I asked for clarification on why this is needed and I didn't get a
lot of details yet.

Is this something that is standard operating procedure?   My understanding
that interfacing with the DUAL table is usually inviting poor performance.
Plus, I don't like to mess around with system tables, in general.

Under what circumstances would it be justified to create sequences on the
DUAL table?   Should I just flat-out refuse this request and if so, why?

Thanks,

Cherie Machler
Oracle DBA
Gelco Information Network

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to