假设我有一个这样的命令:从SELECT命令创建一个新表
select name, age, haircolor from people where shoesize > 10;
有没有办法,我可以创建基于什么命令返回一个新表的方法吗?我想将该命令的输出传送到一个新表中。
含义:
mysql> show tables;
+-----------------+
| Tables_in_db1 |
+-----------------+
| people |
+-----------------+
1 rows in set (0.00 sec)
mysql> CREATE TABLE FROM "select name, age, haircolor from people where shoesize > 10;";
..?
mysql> show tables;
+-----------------+
| Tables_in_db1 |
+-----------------+
| people |
| NEW TABLE |
+-----------------+
1 rows in set (0.00 sec)