Re: create table like syntax

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: David Durham <ddurham(at)vailsys(dot)com>
Subject: Re: create table like syntax
Date: 2005-10-07 12:36:51
Message-ID: 43466BE3.40200@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Gourish Singbal 2005-10-07 12:41:09 horology test failed
Previous Message Hannes Dorbath 2005-10-07 08:42:54 Re: hi group,,