diff options
Diffstat (limited to 'doc/src/sgml/ref/create_table_as.sgml')
| -rw-r--r-- | doc/src/sgml/ref/create_table_as.sgml | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/doc/src/sgml/ref/create_table_as.sgml b/doc/src/sgml/ref/create_table_as.sgml index bf3c78896b..b31a25704f 100644 --- a/doc/src/sgml/ref/create_table_as.sgml +++ b/doc/src/sgml/ref/create_table_as.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/create_table_as.sgml,v 1.39 2008/11/14 10:22:46 petere Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/create_table_as.sgml,v 1.40 2008/11/20 14:04:45 petere Exp $ PostgreSQL documentation --> @@ -196,10 +196,12 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE <replaceable>table_name <term><replaceable>query</replaceable></term> <listitem> <para> - A <xref linkend="sql-select" endterm="sql-select-title"> or + A <xref linkend="sql-select" + endterm="sql-select-title">, <link linkend="sql-table">TABLE</link>, + or <xref linkend="sql-values" endterm="sql-values-title"> command, or an <xref linkend="sql-execute" endterm="sql-execute-title"> command - that runs a prepared <command>SELECT</> or <command>VALUES</> query. + that runs a prepared <command>SELECT</>, <command>TABLE</>, or <command>VALUES</> query. </para> </listitem> </varlistentry> @@ -261,6 +263,16 @@ CREATE TABLE films_recent AS </para> <para> + To copy a table completely, the short form using + the <literal>TABLE</literal> command can also be used: + +<programlisting> +CREATE TABLE films2 AS + TABLE films; +</programlisting> + </para> + + <para> Create a new temporary table <literal>films_recent</literal>, consisting of only recent entries from the table <literal>films</literal>, using a prepared statement. The new table has OIDs and will be dropped at commit: |
