Ted wrote:
> I should havr said I am using MySQL 5.0.16
>
> CREATE TEMPORARY TABLE mytable_tmp LIKE mytable ENGINE=MEMORY;
Aha --
http://dev.mysql.com/doc/refman/5.0/...ate-table.html says:
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
[(create_definition,...)]
[table_options] [select_statement]
Or:
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
[(] LIKE old_tbl_name [)];
This suggests that using table_options (of which ENGINE=MEMORY is an
example) is not permitted when you're using LIKE old_tbl_name.
So perhaps it would work to use "show create table mytable", get a full
CREATE TABLE statement, and then edit that to specify the MEMORY engine
option.
Regards,
Bill K.