You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2020/03/29 02:11:00 UTC

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

     [ https://issues.apache.org/jira/browse/SPARK-28329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dongjoon Hyun updated SPARK-28329:
----------------------------------
    Affects Version/s:     (was: 3.0.0)
                       3.1.0

> 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.1.0
>            Reporter: Yuming Wang
>            Priority: Major
>
> 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
(v8.3.4#803005)

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