Oracle has a feature it is possible to create tamporary tables. The idea is that a table can be created, can be populated with data, but these data can only be seen during the session. Other sessions do see the table but they see no rows. Even if someone uses the same userid as the user that created the temporary table, no rows are returned.
First the syntax of this temporary table:
create global temporary table onzin (i number(5,0), naam varchar2(30)) on commit preserve rows;
The working can be checked by adding a few rows. It can be verified that the rows exist: even after a commit, the rows are returned.
However if another session is opened, the rows are NOT returned.
What is the use of this feature?
Burleson (http://www.dba-oracle.com/t_temporary_tables_sql.htm) claims that the performance can be improved by such temporary tables. I understand that some in-between results are kept in thic temporary table. They are later re-used by a second query.
This is disputed by Tom Kyle. He writes: “I’m of the mindset that they are almost never needed”. He then proceeds by asking the readers to give him a situation where such temporary tables might be needed. He got some replies but they did not look very convincing.
Whatever: Oracle does know the concept of a temporary table, but their usage seems somewhat limited.