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 -> Re: SEQUENCES- How do I make use of them?

Re: SEQUENCES- How do I make use of them?

From: BIPIN R SAWANT <BIPIN_at_prodigy.net>
Date: Sun, 1 Aug 1999 19:06:42 -0700
Message-ID: <7o2njh$4d2c$1@newssvr03-int.news.prodigy.com>


First of all sequence is not a table it is an object. They posses to pseudo columns with them
nextval and currval.

Select seq.nextval will give you the next higher value and
Select seq.currval will give you the current value of the sequence

You can generate a unique key for a table using sequence

e.g.
insert into dept(deptno) as select dept_seq.nextval from dept. Also using sql*ldr you can load the data into a table wth a unique key

B>>>F>>>>>S

Jim <not_a_valid_address_at_email.net> wrote in message news:7o0r27$geo$1_at_bgtnsc03.worldnet.att.net...
>How do I make use of sequences?
>
>I created an ERD, then transformed & generated the associated database
>objects.
>I can see that the sequence tables were created, but they don't appear to
be
>associated with any of the "live" data tables...
>
>I'm new to Oracle, but experienced with various RDBMS products.
>I'd expect to see either some declarative syntax, some trigger code, or
>something to associated the sequences with the associated PK columns.
>
>What am I missing?
>
>Thanks In Advance for any help!
>
>Jim
>
>
Received on Sun Aug 01 1999 - 21:06:42 CDT

Original text of this message

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