MySQL Temporary Table
Creating session-scoped temporary tables that automatically drop when client connection closes.
-- Create session temporary table
CREATE TEMPORARY TABLE temp_order_summary (
order_id INT,
total_items INT,
total_amount DECIMAL(10,2)
);
INSERT INTO temp_order_summary VALUES (101, 3, 149.99);
SELECT * FROM temp_order_summary;+----------+-------------+--------------+ | order_id | total_items | total_amount | +----------+-------------+--------------+ | 101 | 3 | 149.99 | +----------+-------------+--------------+ 1 row in set (0.00 sec)