SQL Server creates a temporary table:
Create temporary table
Method 1:
Create Table # temporary table name (Field 1 constraints,
Field 2 constraints,
.....)
Create Table # temporary table name (Field 1 constraints,
Field 2 constraints,
.....)
Method 2:
Select * into # temporary table name from your table;
Select * into # temporary table name from your table;
Note: The above # indicates a local temporary table, and # indicates a global temporary table.
Query temporary tables
Select * from # temporary table name;
Select * from # temporary table name;
Delete temporary table
Drop table # temporary table name;
Drop table # temporary table name;
Create a temporary table in MySQL
Create temporary table
Create temporary table name (Field 1 constraint,
Field 2 constraints,
.....)
Query temporary tables
Select * from temporary table name
Delete temporary table
Drop table temporary table name
for MySQL, you can create a temporary table on the MySQL command end. However, the temporary table cannot be created in phpMyAdmin. why?