Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to create temp Sequence for multi sessions

764712Sep 15 2010 — edited Sep 16 2010
Hi,
I"m using Global Temp table and I need to insert Identity (or Seq-Number) column into it, but I also have multiple sessions for my sp and each case shold have it's own Seq-Number, starting from 0.
Is there any kind of "temp sequence" in Oracle ? that works in the same fashion like GTT , so multiple sessions each will get fresh zero anytime they will refer it.
I also found out that ROWNUM will not work in my case.

Probably I also can create SEQUENCE in my sp with some unique name let say with SID , something like:

select sys_context('SID') into tmp_SID from dual ;
CREAT SEQUENCE 'MYSEQ'||tmp_SID start with 0 .....



Tx
Trent
This post has been answered by Hemant K Chitale on Sep 16 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 14 2010
Added on Sep 15 2010
10 comments
2,942 views