SELECT INTO

名称

SELECT INTO — 从当前表或视图中创建一个新表

语法

SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
    expression [ AS name ] [, ...]
    [ INTO [ TEMPORARY | TEMP ] [ TABLE ] new_table ]
    [ FROM table [ alias ] [, ...] ]
    [ WHERE condition ]
    [ GROUP BY column [, ...] ]
    [ HAVING condition [, ...] ]
    [ { UNION [ ALL ] | INTERSECT | EXCEPT } select ]
    [ ORDER BY column [ ASC | DESC | USING operator ] [, ...] ]
    [ FOR UPDATE [ OF class_name [, ...] ] ]
    LIMIT { count | ALL } [ { OFFSET | , } start ]

输入

所有输入的域都在 SELECT 中有详细描述.

输出

所有输入的域都在  SELECT 中有详细描述.

描述

SELECT INTO 从一个查询中创建一个新表.比较典型的是这个查询从一个现存的表中提取数据,但实际上任何 SQL 查询都可以.
注意:CREATE TABLE AS 功能上和 SELECT INTO 命令相等.