CREATE TABLE AS

Поиск
Список
Период
Сортировка
От Chairudin Sentosa Harjo
Тема CREATE TABLE AS
Дата
Msg-id 388C3A8D.AE8F0814@prima.net.id
обсуждение исходный текст
Ответ на unicode  (Mitja Novak <mitja@mail.velenje.cx>)
Ответы Re: [GENERAL] CREATE TABLE AS  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Mitja Novak
Дата:
Сообщение: unicode
Следующее
От: David Warnock
Дата:
Сообщение: Re: [GENERAL] CREATE TABLE AS