Hi,
i use oracle 8.1.5 .
i have a temporary table with the scope of session.
(created with on commit preserve rows clause)
from oracle's documentation the explanation
for user_tables.duration is
If temporary table, then duration is sys$session or
sys$transaction, else NULL.
i understand sys$transaction means all the rows
will be deleted after a commit. that is the
duration is just for a transaction.
but in my case the rows still exist.
below is the actual screen shot.
is my understanding wrong? can anyone explain.
SQL>
SQL> select table_name, duration
from user_tables
where table_name='TEMP__INVOICES';
TABLE_NAME DURATION
------------------------------ ---------------
TEMP__INVOICES SYS$TRANSACTION
SQL> SELECT * FROM TEMP__INVOICES;
no rows selected
SQL> insert into temp__invoices (invoicenumber) values (10);
1 row created.
SQL> SELECT INVOICENUMBER FROM TEMP__INVOICES;
INVOICENUMBER
-------------
10
SQL> COMMIT;
Commit complete.
SQL> SELECT INVOICENUMBER FROM TEMP__INVOICES;
INVOICENUMBER
-------------
10
SQL>
with thanks,
-Raja