How to create temp Sequence for multi sessions
764712Sep 15 2010 — edited Sep 16 2010Hi,
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