Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.0
    • None
    • SQL
    • None

    Description

      Synopsis

      [ 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 ] [...] ]
      

      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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yumwang Yuming Wang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: