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: current sequence value

Re: current sequence value

From: Christopher Beck <clbeck_at_us.oracle.com>
Date: Wed, 13 Jan 1999 22:12:07 GMT
Message-ID: <36a11a05.33286904@inet16.us.oracle.com>


On Wed, 13 Jan 1999 12:41:23 -0800, Erik Forkalsrud <erik_at_acim.com> wrote:

>
>Hi,
>
>I'm a newbie when it comes to Oracle, and I'm trying to move
>an MS SQL based application to Oracle 8.
>
>The MS SQL application uses the construct:
> INSERT INTO table_with_identity_column
> SELECT @@Identity
>
>I have figured out how to create a sequence object and a
>trigger to insert sequential values, but I haven't figured
>out how to retrieve the current value of a sequence object.
>Do sequence objects have other methods than mysequence.nextval

>(something like mysecquence.currentval) that I can use?
Close.

select mysequence.currval from dual;

hope this helps.

chris.

>
>Suggestions are appreciated.
>
>Erik Forkalsrud

--
Christopher Beck
Oracle Corporation
clbeck_at_us.oracle.com
Reston, VA.



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Wed Jan 13 1999 - 16:12:07 CST

Original text of this message

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