CREATE TABLE AS

From: Chairudin Sentosa Harjo <chai(at)prima(dot)net(dot)id>
To:
Cc: pgsql-general <pgsql-general(at)postgreSQL(dot)org>
Subject: CREATE TABLE AS
Date: 2000-01-24 11:42:05
Message-ID: 388C3A8D.AE8F0814@prima.net.id
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;

I received error saying:

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

Why is that?
Could someone help me please?

Regards,
Chai

In response to

  • unicode at 2000-01-24 08:04:23 from Mitja Novak

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Warnock 2000-01-24 12:19:39 Re: [GENERAL] CREATE TABLE AS
Previous Message Mitja Novak 2000-01-24 08:04:23 unicode