create table as problem

From: garry saddington <garry(at)schoolteachers(dot)co(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: create table as problem
Date: 2006-09-15 20:42:35
Message-ID: 1158352955.30096.3.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am getting a syntax error at or near 'as' in this method, can anyone
help?

create table iclasses
(classid serial,
subject text,
year text,
groups text,
teacher text,
set text
)
as select distinct subject,year,groups,teacher,set from interimclasses

I need to make a new table with a classid. Any comments are more than
welcome.
regards
garry

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2006-09-15 21:00:47 Re: create table as problem
Previous Message zeljko 2006-09-15 19:38:10 Re: compressed protocol