From: | "CM" <news_shield(at)themus(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: CREATE TABLE AS and ORDER BY |
Date: | 2001-02-23 09:16:20 |
Message-ID: | 9759p5$1216$1@news.tht.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
"Joy Chuang" <hxc0850(at)omega(dot)uta(dot)edu> wrote in message
news:3A7F5AF9(dot)B23DF42F(at)omega(dot)uta(dot)edu(dot)(dot)(dot)
> Hi,
>
> I tried to use CREATE TABLE AS and ORDER BY. The query is as followed:
>
> create table freshhr21 as
> select e.studentid, u.hoursxfer
> from enrollmentstatus e, undergradclass u
> where e.studentid = u.studentid and e.classtd = '1'
> order by u.hoursxfer
>
> But, it returns error message "ERROR: parser: parse error at or near
> "order"". Does "create table as" support "order by" inside of it?
>
> I am using PostgreSQL 6.5.3.
When you CREATE TABLEs you don't say anything about ordering. I should say
it doesn't matter what the order is. When you SELECT from the table you can
use ORDER BY.
From | Date | Subject | |
---|---|---|---|
Next Message | Jaume Teixi | 2001-02-23 11:04:30 | HELP: m$ access -> psql howto ? |
Previous Message | Ines.Klimann | 2001-02-23 08:35:01 | Re: insert values |