You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yuming Wang (JIRA)" <ji...@apache.org> on 2019/07/10 08:37:00 UTC

[jira] [Created] (SPARK-28329) SELECT INTO syntax

Yuming Wang created SPARK-28329:
-----------------------------------

             Summary: SELECT INTO syntax
                 Key: SPARK-28329
                 URL: https://issues.apache.org/jira/browse/SPARK-28329
             Project: Spark
          Issue Type: Sub-task
          Components: SQL
    Affects Versions: 3.0.0
            Reporter: Yuming Wang


h2. Synopsis
{noformat}
[ WITH [ RECURSIVE ] with_query [, ...] ]
SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
    * | expression [ [ AS ] output_name ] [, ...]
    INTO [ TEMPORARY | TEMP | UNLOGGED ] [ TABLE ] new_table
    [ FROM from_item [, ...] ]
    [ WHERE condition ]
    [ GROUP BY expression [, ...] ]
    [ HAVING condition [, ...] ]
    [ WINDOW window_name AS ( window_definition ) [, ...] ]
    [ { UNION | INTERSECT | EXCEPT } [ ALL | DISTINCT ] select ]
    [ ORDER BY expression [ ASC | DESC | USING operator ] [ NULLS { FIRST | LAST } ] [, ...] ]
    [ LIMIT { count | ALL } ]
    [ OFFSET start [ ROW | ROWS ] ]
    [ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ]
    [ FOR { UPDATE | SHARE } [ OF table_name [, ...] ] [ NOWAIT ] [...] ]
{noformat}

h2. Description

{{SELECT INTO}} creates a new table and fills it with data computed by a query. The data is not returned to the client, as it is with a normal {{SELECT}}. The new table's columns have the names and data types associated with the output columns of the {{SELECT}}.

 

{{CREATE TABLE AS}} offers a superset of the functionality offered by {{SELECT INTO}}.

[https://www.postgresql.org/docs/11/sql-selectinto.html]
 [https://www.postgresql.org/docs/11/sql-createtableas.html]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org