SQL command Error: "create table ... Like parentTable including defaults"

From: Ying Lu <ying_lu(at)cs(dot)concordia(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: SQL command Error: "create table ... Like parentTable including defaults"
Date: 2005-05-27 15:48:39
Message-ID: 42974157.201@cs.concordia.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Greetings,

I have a simple question about SQL command :

create table tableName1 LIKE parentTable INCLUDING defaults ;

I was trying to create table "tableName1" with the same structure as
"parentTable" without any data. I got a syntax error:
'syntax error at or near "like" ... '

I guess there must be something wrong with my sql command, could
somebody help?

Thanks a lot,
Emi

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bricklen Anderson 2005-05-27 16:02:29 Re: SQL command Error: "create table ... Like parentTable
Previous Message Tony Wasson 2005-05-27 15:18:44 Re: 3 tables, slow count(*), order by Seq Scan in Query Plan