创建表的同时将查询的结果写入到数据表中
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;
时间: 2024-10-06 00:10:53