I was reading about tables using MEMORY ENGINE (tables stored in ram).
Is it possible to use CREATE TABLE AS SELECT
syntax, but have the create
you can also create a temporary table this way:
CREATE TEMPORARY TABLE IF NOT EXISTS tmp ENGINE=MEMORY AS (
SELECT 'abc' As tomcat, 'def' As apache);
Or this way:
CREATE TEMPORARY TABLE IF NOT EXISTS tmp ENGINE=MEMORY AS (
SELECT tomcat, apache From servers);
Be advised, the first option will create the two columns as varchar(3), meanwhile the second option will import any column information from the original table, even their comments.