The temporary tables could be very useful in some cases to keep temporary data.
♦ A temporary table is created by using CREATE TEMPORARY TABLE statement
♦ A temporary table is only available and accessible by the client who creates the table.
Syntex:
Create TEMPORARY TABLE TableName
Example:
SELECT * FROM student
Result:
Example1:
Create TEMPORARY TABLE TempStudent
SELECT * FROM student
select * from TempStudent
Result:
Drop MySQL temporary table
DROP TEMPORARY TABLE removes only temporary tables, not the permanent tables
Example:
DROP TEMPORARY TABLE TempStudent
0 Comments