Re: Create an empty copy of another table - Mailing list pgsql-novice

From
Subject Re: Create an empty copy of another table
Date
Msg-id 000601bfe10d$a21dce30$0602010a@bullwinkle.vectormath
Whole thread Raw
In response to Create an empty copy of another table  (Thomas Weholt <Thomas@cintra.no>)
List pgsql-novice
I don't have time to test it out right now, but it
should be something like this:

SELECT * INTO tblTemp FROM tblExistingTable WHERE
nFieldOne = 5;

Look in the docs under SELECT INTO

David Boerwinkle
-----Original Message-----
From: Thomas Weholt <Thomas@cintra.no>
To: 'pgsql-novice@postgresql.org'
<pgsql-novice@postgresql.org>
Date: Wednesday, June 28, 2000 9:29 AM
Subject: [NOVICE] Create an empty copy of another
table


>Hi,
>
>How do I create a new empty table that`s a copy
of an allready existing one?
>I need a way of putting the result of a
select-statement into a temporary
>table that`s an exact copy of the table it`s
derived from and I`m not sure
>how to do this. Obviously. I am just using one
table to query at the time.
>
>Thomas


pgsql-novice by date:

Previous
From: Andrew McMillan
Date:
Subject: Re: Create an empty copy of another table
Next
From: Martin Maney
Date:
Subject: What's the point of multiple databases?