MySQL Tutorial/Table/Temporary Table
Temporary Tables
Temporary tables are fleeting in nature lasting only for the length of the MySQL session.
The syntax for creating temporary tables is:
CREATE TEMPORARY TABLE <table> (
field definitions
);
Using a query to create the temporary table
CREATE TEMPORARY TABLE <newtable>
SELECT * FROM <oldtable>