mysql create tempory table for select statement
-- TEMP TABLE FOR SELECTS CREATE TEMPORARY TABLE temp_table AS SELECT * FROM table1 a JOIN table2 b ON a.id = b.id; SELECT * FROM temp_table;