counter customizable free hit

Wednesday, August 10, 2005

Temporary Tables

In Oracle it's possible to create temporary tables. The name is a little missleading in that the table itself is not temporary but the data inside is. There are 2 basic types of temporary tables, those that clear the information in them apon a commit and those which preserve the rows when a commit takes place. However the data is always cleared from the table when the user ends their session.

The other feature of temporary tables in Oracle is that the data is available to the current session. Therefore 2 users can use the table without fear of causing problems in other sessions.

MySQL also supports temporary tables, but the big difference is that they are temporary. This means that they are only available during the current session, once the session has ended the table is dropped automatically. This means they do not exists as an object in the database and therefore need to be recreated each time they are to be used.

Like Oracle the data contained within them is available to the current session only, however unlike Oracle users can create temporary tables with the same name and a completely different structure.


Post a Comment

<< Home