CREATE TABLE AS - Mailing list pgsql-general

From Chairudin Sentosa Harjo
Subject CREATE TABLE AS
Date
Msg-id 388C3A8D.AE8F0814@prima.net.id
Whole thread Raw
In response to unicode  (Mitja Novak <mitja@mail.velenje.cx>)
Responses Re: [GENERAL] CREATE TABLE AS  (Bruce Momjian <pgman@candle.pha.pa.us>)
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;


I received error saying:

ERROR:  parser: parse error at or near "order"


Why is that?
Could someone help me please?

Regards,
Chai

pgsql-general by date:

Previous
From: Mitja Novak
Date:
Subject: unicode
Next
From: David Warnock
Date:
Subject: Re: [GENERAL] CREATE TABLE AS