You could create a database
sequence that is incremented by 1 everytime
you need to create a table.
You could also use the session's id as you
were suggesting. The one problem
is that the first character of the
table should be Alpha, and
not numeric, which would be the case if you
took either an Oracle Sequence
or userenv('sessionid'), so you should be
suffixing the tablename with
the unique number.
Another option, if you have
Oracle8i is to create a global temporary
table, which from what I can
figure, is a C structure in memory. With
this, you can define a table
structure, and when you insert data into
this table, only you can see
the contents of the table. You can define
the data to be available for
a Session or a Transaction.
Issue the following statement to find out your session id
select userenv('sessionid') from dual
Reply:
That will just give you the
AUDSID. To get the value of the session ID,
you need to:
select sid from v$session where
audsid = userenv('sessionid');