Re: [GENERAL] CREATE TABLE AS

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: chai(at)prima(dot)net(dot)id
Cc: pgsql-general <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: [GENERAL] CREATE TABLE AS
Date: 2000-01-24 16:29:43
Message-ID: 200001241629.LAA16462@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alex Guryanow 2000-01-24 17:16:29 uninterruptible sleep
Previous Message Jose Soares 2000-01-24 14:45:11 Re: [GENERAL] max(oid)