PostgreSQL7.0手册-用户手册-19. SQL命令-SELECT INTO

减小字体 增大字体 作者:佚名  来源:本站整理  发布时间:2009-03-16 13:43:32
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 命令相等.

Tags:

作者:佚名
分享到: 微信 更多