MySQL Tutorial/Table/Temporary Table

Материал из SQL эксперт
Перейти к: навигация, поиск

Temporary Tables

Temporary tables are fleeting in nature lasting only for the length of the MySQL session.

The syntax for creating temporary tables is:



   <source lang="sql">
CREATE TEMPORARY TABLE ( field definitions );</source>

Using a query to create the temporary table

   <source lang="sql">

CREATE TEMPORARY TABLE <newtable>

SELECT * FROM <oldtable></source>