To explicitly create a temporary table, you can use the following sample syntax:
CREATE TEMPORARY TABLE temptablename(
col1definition,
col2definition,
colndefinition);
To implicitly create a temporary table schema from one or more tables via a query, you can use the following sample syntax:
CREATE TEMPORARY TABLE temptablename
SELECT * FROM permanenttable
LIMIT 0;
To delete a temporary table, you can use the following sample syntax:
DROP TEMPORARY TABLE temptablename;