A temporary table can be created by adding the keyword TEMPORARY to the CREATE TABLE statement:
mysql> mysql> CREATE TEMPORARY TABLE t (i INT); Query OK, 0 rows affected (0.00 sec) mysql> mysql> drop table t; Query OK, 0 rows affected (0.00 sec)