Re: create table like syntax - Mailing list pgsql-admin

From Gaetano Mendola
Subject Re: create table like syntax
Date
Msg-id 43466BE3.40200@bigfoot.com
Whole thread Raw
In response to create table like syntax  (David Durham <ddurham@vailsys.com>)
List pgsql-admin
David Durham wrote:
> is there a syntax that would look something like:
>
>     create table newTable like oldTable without indexes || records ||
> constraints with indexes || records || constraints
>
> built into postgres?
>

Try this:

create table newTable as
select * from oldTable limit 0;



Regards
Gaetano Mendola


pgsql-admin by date:

Previous
From: Gourish Singbal
Date:
Subject: horology test failed
Next
From: Gourish Singbal
Date:
Subject: Re: horology test failed