MYSQL---CREATE...SELECT

创建表的同时将查询的结果写入到数据表中

CREATE TABLE IF NOT EXISTS tbl_name [(create_definition,...)]  select_statement  

例:

CREATE TABLE IF NOT EXISTS job(id SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT,name VARCHAR(20) NOT NULL)  SELECT job FROM person GROUP BY job;

 

你可能感兴趣的:(select)