Got error on CREATE TABLE AS

From: "Jeff Lu" <jklcom(at)mindspring(dot)com>
To: "Postgresql General" <pgsql-general(at)postgresql(dot)org>
Subject: Got error on CREATE TABLE AS
Date: 2001-11-05 01:53:02
Message-ID: LIEBJAJMJFLPHGCPMEBGKEIPCEAA.jklcom@mindspring.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I'm getting parser error at or near AS

when try to copy a table using CREATE TABLE AS

Here what I have in the sql statement

CREATE TABLE employee_backup (id text UNIQUE, lastname text, firstname text,
phone text) AS SELECT * FROM employee

Can some body tell me what is wrong with the sql statement?

Thank you

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Justin Clift 2001-11-05 03:39:10 Unusual problem. A sequence is incrementing by 2 when increment_by = 1, think it's caused by an INSERT rule
Previous Message Aasmund Midttun Godal 2001-11-05 01:46:48 Re: newbie question