Re: CREATE table1 FROM table2

From: "L(dot)V(dot)Boldareva" <me(at)pierro(dot)dds(dot)nl>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: CREATE table1 FROM table2
Date: 2003-06-23 15:26:06
Message-ID: 98966401561.20030623172606@pierro.dds.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello!

many people posted their answer to this simple question. however,
neither
CREATE TABLE AS
nor
SELECT INTO

do not take care about keys and triggers, etc.

The commands above only copy the structure of the table, and the data.
Are there any workarounds fr copying the table as a whole object?

thanks,
Mila

> Hi,

> On 17 Jun 2003, Rado Petrik wrote:

>> How I create table1 from other table2 .

> CREATE TABLE table1 AS SELECT * FROM table2;

> will work.

> Regards,

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Nicolas JOUANIN 2003-06-23 16:29:51 TR: Like and =
Previous Message Tom Lane 2003-06-23 14:28:03 Re: convert_numeric_to_scalar: unsupported type 354210