CREATE TABLE AS and ORDER BY

From: Joy Chuang <hxc0850(at)omega(dot)uta(dot)edu>
To: pgsql-sql(at)postgresql(dot)org
Subject: CREATE TABLE AS and ORDER BY
Date: 2001-02-06 02:01:30
Message-ID: 3A7F5AF9.B23DF42F@omega.uta.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

Thank you.

Joy Chuang

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Thomas Lockhart 2001-02-06 04:48:47 Re: How to modify type in table?
Previous Message Stephan Szabo 2001-02-06 00:37:27 Re: how to simulate UPdate ...?