1.创建表的同时插入其他表的数据
CREATE TABLE table_name
SELECT ...
FROM ...
[...]
例:
CREATE TABLE tabl_memory ENGINE = MEMORY
SELECT city_id, city, country_id
FROM city
GROUP BY city_id