Re: [GENERAL] CREATE TABLE AS - Mailing list pgsql-general

From Bruce Momjian
Subject Re: [GENERAL] CREATE TABLE AS
Date
Msg-id 200001241629.LAA16462@candle.pha.pa.us
Whole thread Raw
In response to CREATE TABLE AS  (Chairudin Sentosa Harjo <chai@prima.net.id>)
List pgsql-general
> Hi,
>
> How do I create a table from a 'select' statement?
> I tried the help from psql '\h create table',
> it does not explain how.
>
> I tried:
>
> create table blah2 as
> select pin from tbs_billing_record
> where date(start_time) between '01-JAN-2000' and '23-JAN-2000'
> order by pin;

SELECT ... INTO...


--
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-general by date:

Previous
From: Jose Soares
Date:
Subject: Re: [GENERAL] max(oid)
Next
From: Alex Guryanow
Date:
Subject: uninterruptible sleep