Mega Code Archive

 
Categories / MySQL Tutorial / 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  ); mysql> mysql> CREATE TEMPORARY TABLE temp (     ->      id int     -> ); Query OK, 0 rows affected (0.00 sec) mysql> mysql> show tables; Empty set (0.00 sec) mysql> mysql> drop TEMPORARY TABLE temp; Query OK, 0 rows affected (0.00 sec)