Using MySQL 5 I would like to insert the results of a SELECT statement into a temporary table that would be created automatically. Is that possible ?
See here: http://dev.mysql.com/doc/refman/5.1/en/ansi-diff-select-into-table.html exa,ple from mysql manual: Code: INSERT INTO tbl_temp2 (fld_id) SELECT tbl_temp1.fld_order_id FROM tbl_temp1 WHERE tbl_temp1.fld_order_id > 100;
creating a temporary table from a SELECT till, your suggestion appears to require the new table to already be defined. I want it to be created automatically. But your link led me to the solution: create temporary table tmp_tbl as SELECT ....... The online manuals are so difficult to search. I didn't post my request until I had spent hours searching the MySQL manual. Thanks.