1999-07-22 17:09:15 +02:00
|
|
|
<!--
|
2000-12-26 00:15:27 +01:00
|
|
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table_as.sgml,v 1.4 2000/12/25 23:15:26 petere Exp $
|
1999-07-22 17:09:15 +02:00
|
|
|
Postgres documentation
|
|
|
|
-->
|
|
|
|
|
|
|
|
<refentry id="SQL-CREATETABLEAS">
|
1999-06-14 09:37:05 +02:00
|
|
|
<refmeta>
|
1999-07-22 17:09:15 +02:00
|
|
|
<refentrytitle id="SQL-CREATETABLEAS-TITLE">
|
1999-06-14 09:37:05 +02:00
|
|
|
CREATE TABLE AS
|
|
|
|
</refentrytitle>
|
|
|
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
|
|
|
</refmeta>
|
|
|
|
<refnamediv>
|
|
|
|
<refname>
|
|
|
|
CREATE TABLE AS
|
|
|
|
</refname>
|
|
|
|
<refpurpose>
|
|
|
|
Creates a new table
|
|
|
|
</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsynopsisdiv>
|
|
|
|
<refsynopsisdivinfo>
|
1999-07-22 17:09:15 +02:00
|
|
|
<date>1999-07-20</date>
|
1999-06-14 09:37:05 +02:00
|
|
|
</refsynopsisdivinfo>
|
|
|
|
<synopsis>
|
|
|
|
CREATE TABLE <replaceable>table</replaceable> [ (<replaceable>column</replaceable> [, ...] ) ]
|
|
|
|
AS <replaceable>select_clause</replaceable>
|
|
|
|
</synopsis>
|
|
|
|
|
|
|
|
<refsect2>
|
|
|
|
<refsect2info>
|
|
|
|
<date>1998-09-22</date>
|
|
|
|
</refsect2info>
|
|
|
|
<title>
|
|
|
|
Inputs
|
|
|
|
</title>
|
|
|
|
<para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
1999-07-06 19:16:42 +02:00
|
|
|
<term><replaceable>table</replaceable></term>
|
1999-06-14 09:37:05 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The name of a new table to be created.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
1999-07-06 19:16:42 +02:00
|
|
|
<term><replaceable>column</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The name of a column. Multiple column names can be specified using
|
|
|
|
a comma-delimited list of column names.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable>select_clause</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
A valid query statement. Refer to SELECT for a description of the
|
|
|
|
allowed syntax.
|
1999-06-14 09:37:05 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect2>
|
|
|
|
|
|
|
|
<refsect2>
|
|
|
|
<refsect2info>
|
|
|
|
<date>1998-09-22</date>
|
|
|
|
</refsect2info>
|
|
|
|
<title>
|
|
|
|
Outputs
|
|
|
|
</title>
|
|
|
|
<para>
|
1999-07-06 19:16:42 +02:00
|
|
|
Refer to <command>CREATE TABLE</command>
|
|
|
|
and <command>SELECT</command> for a summary of possible output
|
1999-06-14 09:37:05 +02:00
|
|
|
messages.
|
|
|
|
</para>
|
|
|
|
</refsect2>
|
|
|
|
</refsynopsisdiv>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<refsect1info>
|
|
|
|
<date>1998-09-22</date>
|
|
|
|
</refsect1info>
|
|
|
|
<title>
|
|
|
|
Description
|
|
|
|
</title>
|
1999-07-06 19:16:42 +02:00
|
|
|
<para>
|
1999-07-22 17:09:15 +02:00
|
|
|
<command>CREATE TABLE AS</command> enables a table to be created
|
|
|
|
from the contents of an existing table.
|
|
|
|
It is functionality equivalent to
|
2000-12-26 00:15:27 +01:00
|
|
|
<xref linkend="sql-selectinto" endterm="sql-selectinto-title">,
|
1999-07-06 19:16:42 +02:00
|
|
|
but with perhaps a more direct syntax.
|
1999-06-14 09:37:05 +02:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:nil
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../reference.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:"/usr/lib/sgml/catalog"
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
-->
|