Re: CREATE table1 FROM table2

From: Guillaume LELARGE <gleu(at)wanadoo(dot)fr>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: CREATE table1 FROM table2
Date: 2003-06-17 19:10:56
Message-ID: 200306171910.56181.gleu@wanadoo.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

Le Mardi 17 Juin 2003 20:46, Achilleus Mantzios a écrit :
> On 17 Jun 2003, Rado Petrik wrote:
> > How I create table1 from other table2 .
> >
> > "cp table1 table2"
>
> create table table2 as select * from table1;
>
Another way would be:
select * into table2 from table1;

(See
http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=sql-selectinto.html).

--
Guillaume <!-- http://absfr.tuxfamily.org/ -->.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Eric Anderson Vianet SAO 2003-06-17 19:31:04 Re: yet pg_toast reindex
Previous Message Radu-Adrian Popescu 2003-06-17 18:58:12 Re: Catching DML exceptions in PL/pgSQL